Alpha Video Training
Results 1 to 8 of 8

Thread: Is It Possible To Use Show/Hide Expressions In Reports?

  1. #1
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,695

    Default Is It Possible To Use Show/Hide Expressions In Reports?

    Say I want to conditionally show/hide a control in a report, is there a way to do this? It is not jumping out at me if there is :-/
    Alpha Anywhere v12.4.6.1.7 Build 6402-5418 IIS v10.0 on Windows Server 2019 Std in Hyper-V

  2. #2
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    Are you building an active report with live controls?

    One good way to show or not show something on a report is to make a calculated field, then use the results of that calculated field.

    Reports also can have conditional objects.
    -Steve


  3. #3
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,695

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    Hmm, no it's not a live report, it is based on a SQL query.

    Ideally I'd like to hide a Frame object in the report based on the value in another control. I haven't figured this out yet.
    Alpha Anywhere v12.4.6.1.7 Build 6402-5418 IIS v10.0 on Windows Server 2019 Std in Hyper-V

  4. #4
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    Try this:

    Make a new report in Northwind

    Datasource is the Categories table, select the CategoryName field

    Make the report, put the CategoryName in the detail section.

    Put a frame around the CategoryName field.

    From the Task List on the menu at top, select Properties.

    Click on the Frame and the properties for the frame will show.

    Find the Layout/Visible property and click the plus icon to expand your choices.

    Set the Visible property to Dynamic with this expression:
    CategoryName = "Confections"

    See if that suggests a solution.
    -Steve


  5. #5
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,695

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    Steve,

    Yes that works! That is exactly what I need to do.
    I was missing the part about Task List properties .. I never saw those extra properties until you told me that.

    Thank you sooo much! I am ecstatic, I worked on this all day and got nowhere.
    Alpha Anywhere v12.4.6.1.7 Build 6402-5418 IIS v10.0 on Windows Server 2019 Std in Hyper-V

  6. #6
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,695

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    One thing I notice doing this is the whitespace does not collapse when the controls are hidden (see image).

    Do you know if there is another property buried somewhere to collapse the whitespace?

    Collapse Whitespace.jpg
    Alpha Anywhere v12.4.6.1.7 Build 6402-5418 IIS v10.0 on Windows Server 2019 Std in Hyper-V

  7. #7
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,845

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    What type of controls are they? Is this like a large text box?

    Each text box has an allow shrinking option - you could try that.

    What I often do is make my text boxes small and then allow growth. That will allow them to grow as large as they need to when they are filled and showing, but when I hide them, they take up little room.

  8. #8
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default Re: Is It Possible To Use Show/Hide Expressions In Reports?

    I think you're beginning to see why I prefer, when possible, to just construct reports by hand-coding the HTML.

    Alpha's report writer is terrific, but once you learn to just code your own these little things are more easily managed.

    As for the white space in what you're building right now - not sure, and I'd have to try. And I'd work with a variation of what Larry suggests - put the data into a Rich Text object that can grow and shrink as needed.
    -Steve


Similar Threads

  1. Show / Hide -> Delete Values if Initially Show, then Hide
    By hangbill in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 08-28-2014, 09:39 AM
  2. Show/hide expressions being overwritten by Alpha
    By dustinh in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 09-09-2013, 09:44 AM
  3. Replies: 2
    Last Post: 03-28-2012, 03:55 PM
  4. Slow page when adding a few Show/Hide and Enable Client Side Expressions
    By iviowa in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 10-24-2011, 10:14 AM
  5. Show/Hide and Enable Expressions in browser
    By SCJBF in forum Application Server Version 8
    Replies: 3
    Last Post: 11-05-2007, 07:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •