Row Visibility Challenge
Here is the challenge:I have a report containing a group with many members. For the initial report view, the client would like to see only the group name along with the first two member names (and their associated data). If interested, they would like to expand the selection to reveal all members. How can this be done with the visibility property?Thanks for your help!
February 17th, 2009 7:15pm
I'm not aware of any way to do this within one report in RS. Visibility tends to be an all-or-nothing operation. You could do it with two reports configured like this:The first report is filtered to show only the top 2 details rows for each group, but contains an action to drill through to a new report that takes the grouping ID as a parameter.The second report is nearly identical to the first report, but it uses the ID parameter passed to it as a signal to not filter that particular group.You can then use the back button to link back to the first report (and repeat the drill through on a new section, if desired).This approach hasits disadvantanges: You can only have one section of the report 'expanded' at a time, and you always have to be returning to the 'unexpanded' state (the initial report) between selections.Someone else may have a better suggestion on how to do this using Matrices.PaulThis posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2009 9:34pm
Thanks for the feedback. The disadvantage you mention would be objectionable to the client.Someone mentioned using expressions to control the row's visibility. Is it possible to create a "group" from a dataset that only contains a few rows from that dataset?
February 17th, 2009 10:14pm
I would add aReportVersion parameter with two choices: Label: Show first 2 recordsValue: 1Label:Show all recordsValue: 2Then I would setrow visibility to an expression:=IIF(Parameters!ReportVersion.Value =2,false,iif (rownumber("GroupName") =1 orrownumber("GroupName") = 2,false,true))It won't be a drilldown but a parameter value switch but should accomplish the same.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2009 11:08pm
Is it possible to build such a change into a "click" event on the textbox containing the data?
February 18th, 2009 12:44am
Hi,
From the scenario you described, you are looking forhiding the plus sign automatically. Here are two similar threads:
http://social.technet.microsoft.com/forums/en-US/sqlreportingservices/thread/563e6d9e-c824-4719-933e-37306a3b652f
http://social.technet.microsoft.com/forums/en-US/sqlreportingservices/thread/179b832e-86b6-4e5b-8deb-a38fbf81ecce
Please let me know the results.
Regards,
Raymond Lee
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2009 3:22pm
Thanks to all for the comments so far. I think we are getting closer.For clarification, my requirements look like this:Initial view:+ Cat A SubCat A SubCat BThe Client would like this:- Cat A SubCat A SubCat B SubCat C SubCat D SubCat EAn expression-based solution looks like the way to handle this situation. What would that expression look like?
February 18th, 2009 5:10pm
Hi Tim,
You can achieve this, however, you need to filter the first two members with some expressions. Suppose we have a group Cat and a detail group SubCat, also we have an ID number for each detail. Please try the following steps:
1 Create a table with two columns Cat and SubCat. Create a group named Group-Cat (without group footer) on expression "=Fields!Cat.Value". Right-click the handle of Group-Cat, insert two rows below. After that set table cell expression like this:
handles
table Header
1
=Fields!Cat.Value
1
=iif(Fields!ID.Value<=1,Fields!ID Value,nothing)
1
=iif(Fields!ID.Value>1&& Fields!ID.Value<=2,Fields!ID Value,nothing)
==
SubCat
= Fields!ID.Value
2 Right-click the handle of the second row group, click Properties (not edit group). In the Properties pane, set Hidden property of visibility to be true and ToggleItem property of visibility to be the first cell of Group-Cat.
3 Right-click the handle of the third row group, repeat the second step.
4 Right-click the handle of the detail row, click Edit Group (not Properties). Switch to the Visibility tab. Select Visibility can be toggled by another report item and Set Report Item to be the first cell of Group-Cat. Using expression like
"=iif(Fields!ID.Value<=2, false, true)" below Initial visibility.
5 You have to create your own filter expression for replacing the expression "=iif(Fields!ID.Value<=2, false, true)"
6 If there is anything I have not explained clearly, please let me know.
Regards,
Raymond Lee
Free Windows Admin Tool Kit Click here and download it now
February 19th, 2009 8:23am
Raymond:Thank you! I will give this a try on live data and let you know the results.Regards,Tim
February 20th, 2009 10:28pm
Hi Tim,
Can you tell me how you put the image you have above with the handles and table header onto the reply box. That would help me a lot to be able to do that.
Thanks!
Free Windows Admin Tool Kit Click here and download it now
January 7th, 2011 3:26pm