Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problems Using Expressions to control the Visibility ToggleItem (SSRS 2005) Expand / Collapse
Author
Message
Posted Wednesday, April 4, 2012 1:14 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 5:48 PM
Points: 21, Visits: 68
Hi, I have a problem I am hoping someone out there knows the answer to.

I have a report with up to 9 levels of Grouping in the table, and a detail section. Depending on the data the used the report may use any number of Groups (1-9). I want to change the Visibilty ToggleItem on the Detail section to a textbox in whichever is the lowest grouping level being used...

I have the following Expression in the ToggleItem property:

=IIF(FIRST(Fields!GROUP9_HEADER_FLG.Value)="Y",textbox133,=IIF(FIRST(Fields!GROUP8_HEADER_FLG.Value)="Y",textbox117,=IIF(FIRST(Fields!GROUP7_HEADER_FLG.Value)="Y",textbox101,=IIF(FIRST(Fields!GROUP6_HEADER_FLG.Value)="Y",textbox61,=IIF(FIRST(Fields!GROUP5_HEADER_FLG.Value)="Y",textbox85,=IIF(FIRST(Fields!GROUP4_HEADER_FLG.Value)="Y",textbox69,=IIF(FIRST(Fields!GROUP3_HEADER_FLG.Value)="Y",textbox165,=IIF(FIRST(Fields!GROUP2_HEADER_FLG.Value)="Y",textbox48,textbox5))))))))

But I am receiving the following error:

Error 1 [rsInvalidToggleItem] The table ‘table1’ has ‘=IIF(FIRST(Fields!GROUP9_HEADER_FLG.Value)="Y",textbox133,=IIF(FIRST(Fields!GROUP8_HEADER_FLG.Value)="Y",textbox117,=IIF(FIRST(Fields!GROUP7_HEADER_FLG.Value)="Y",textbox101,=IIF(FIRST(Fields!GROUP6_HEADER_FLG.Value)="Y",textbox61,=IIF(FIRST(Fields!GROUP5_HEADER_FLG.Value)="Y",textbox85,=IIF(FIRST(Fields!GROUP4_HEADER_FLG.Value)="Y",textbox69,=IIF(FIRST(Fields!GROUP3_HEADER_FLG.Value)="Y",textbox165,=IIF(FIRST(Fields!GROUP2_HEADER_FLG.Value)="Y",textbox48,textbox5))))))))’ as a toggle item. Toggle items must be text boxes that share the same scope as the hidden item or are in a scope that contains the hidden item, and cannot be contained within the current report item unless current grouping scope has a Parent.

I don't know if I am doing it wrong, or if its just not possible. Can someone give me some pointers?

Thanks

David
Post #1278349
Posted Thursday, April 5, 2012 11:55 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:02 PM
Points: 2,818, Visits: 2,560
Is the textbox you are using a part of the report that groups the detail that you are trying to hide or make visible? The error would indicated that it is not, and that it should be.
Post #1279058
Posted Thursday, April 5, 2012 12:42 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 5:48 PM
Points: 21, Visits: 68
Yes, the textboxes in the Expression are part of the report...

They are nested groups... if GROUP9 isn't being used I want it to remain Hidden, and use a textbox from GROUP8 to toggle the visibility of the Detail section.. if GROUP8 also isn't being used, then move up to GROUP7, etc until I find the inner-most nested group that is being used.

Post #1279091
Posted Friday, August 3, 2012 8:46 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, July 27, 2014 8:47 PM
Points: 316, Visits: 1,483
Hi Dave:

I have a similar problem. I want to set the "ToggleItem" property of the detail row to an expression, but it appears that SSRS 2005 is truly taking any text supplied in the ToggleItem property as a textbox name, and doesn't bother to process the expression as an actual expression. So, any expression that is typed into the ToggleItem property will fail since no textbox has a name that looks like an expression.

To highlight my specific situation, I have a parameter where a user can either group by "company" or group by "manager". If a user selects to group by "Company", then I want the ToggleItem of the detail row to be toggled by a textbox in the group header called "GroupName_1": i.e. the report groups by Company, and a user can then toggle to the details to see the managers for a specific company. If a user selects to group by "manager", however, then I want the detail row to remain hidden without any mechanism to toggle its visibility since the managers' data is now at the group level.

Bottom line: I don't think it's possible to supply an expression in the detail row's ToggleItem property since SSRS will take any text supplied in the property as a textbox name.

If someone knows a way around this, please share.
--Pete



Post #1339888
Posted Thursday, December 26, 2013 6:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 26, 2013 6:24 AM
Points: 1, Visits: 2
I have the same problem. Can someone help please.
Post #1525959
Posted Wednesday, July 23, 2014 7:35 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:16 AM
Points: 406, Visits: 10,850
I have got this to work by setting the visibility on a textbox component on my report which is used to show a total for the column, using an expression based on one of my parameters. Next, I set the Visibility.ToggleItem on the column to the textbox name.

Post #1595480
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse