SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problems Using Expressions to control the Visibility ToggleItem (SSRS 2005)


Problems Using Expressions to control the Visibility ToggleItem (SSRS 2005)

Author
Message
jdrintnt
jdrintnt
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 70
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
Daniel Bowlin
Daniel Bowlin
SSCertifiable
SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)SSCertifiable (7.7K reputation)

Group: General Forum Members
Points: 7732 Visits: 2629
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.
jdrintnt
jdrintnt
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 70
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.
peterzeke
peterzeke
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1892 Visits: 1766
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



haskbask
haskbask
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 8
I have the same problem. Can someone help please.
tripleAxe
tripleAxe
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2052 Visits: 13544
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search