expression using the Hidden property or toggle status of a row group
-
Thursday, January 14, 2010 8:22 PM
I'd like to build an expression based on the current Hidden status (or toggle status) of a Row Group.
When I select the row group and look at the properties I can see it is a "Tablix Member". If I expand the Group property I can see a Name property. The group also has a Hidden property.
I'd like to build an expression that sets the fill color of several textboxes based on whether the row group is collapsed or expanded. I tried several variations along the line of:
=iif(table1_Details_Group.Hidden,"Red","Yellow")
When I try to preview the report it throws the error: [BC30451] Name 'table1_Details_Group' is not declared.I tried setting the DataElementName property to "Detail_Collection" and changing my expression, but it still throws the same error but with 'Detail_Collection' as the named object.
Is what I'm trying to do possible? I looked at several posts that were similar to this but none seem to have solved the problem.
Thanks in advance for any assistance.
All Replies
-
Thursday, January 14, 2010 8:38 PMI've never seen "table1_Details_Group.Hidden" ever used, and I don't think it would simply return a boolean type even if it were valid.
Do you have an expression on the group that determines if it is hidden or not? If so, I would recommend using the same or similar expression in the background color formula. For example, if your Hidden expression is like this:
=IIF(Fields!YourField.Value>10,True,False)
Of course, if YourField = 15, it is hidden. If YourField = 9, it is not hidden. You can use the same logic in your background color expression.
hth...- Proposed As Answer by Jinchun ChenMicrosoft Employee, Moderator Thursday, January 21, 2010 9:31 AM
- Unproposed As Answer by Christian.Bahnsen Thursday, January 28, 2010 2:39 PM
-
Thursday, January 28, 2010 3:19 PMThanks for the reply and sorry for the delay in responding.
I'm not using an expression to hide/unhide the Row Group, rather I'm using another report item as the ToggleItem for my Row Group.
I put a document with screenshots and annotations at http://www.christianbahnsen.com/ssrs_conditional_formatting.pdf
The document may help better explain what I'm trying to accomplish.
Essentially it boils down to being able to determine whether a given row group is visible/currently expanded or not, and doing the conditional formatting based on that visibility/toggle status.
When the user expands a row group, it seems like there has to be an event that fires and triggers a postback. Perhaps I could run some code along with that event to accomplish my objective.
Unfortunately, there doesn't seem to be an object model published for SSRS/RDL. (I have another thread addressing that issue and have posted a request on Connect.)
Thanks in advance for any help. -
Wednesday, March 23, 2011 2:06 PM
Have you managed to solve the problem?
I need to do exactly the same thing.
Thanks.
Ivan

