Link to home
Start Free TrialLog in
Avatar of jdallen75
jdallen75Flag for Canada

asked on

SSRS - Non-existent row/column group appearing

I have a sample dataset attached in Excel, and as you can see, the last field is called UtilityOrder and is returning 1, 2, or 3 only. I have a tablix containing a few expressions and a gauge, and as you can see here, I've set up RowGroup and ColumnGroup on the tablix:

User generated image
Group Expressions are:
RowGroup = Floor((Fields!UtilityOrder.Value-1) / 2)
ColumnGroup =(Fields!UtilityOrder.Value-1) Mod 2

In this example, the intention is that tablix panels go across the row, and once 2 have been placed, a new row is started. The problem is that I'm getting a phantom 4th panel. I've added UtilityOrder to the third expression to illustrate:

User generated image
Why is the 4th panel appearing when UtilityOrder=4 doesn't exist?

Thanks,
Jeff
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdallen75

ASKER

Nicobo,

Thanks for the reply. That *almost* worked. I had to apply that visibility expression to each object (gauge and 2 text objects) and it worked for them. But for some reason, in the header, it thinks UtilityOrder is 2?? (It's almost like a leftover from the object above it). I've also applied the visibility on the tablix object 2, but the header is causing it to remain:

User generated image
Any thoughts?
Strange indeed. It almost seems like a bug. There is no record meeting the columns and row grouping so the fields should be empty. I was able to solve it by using this formula for the hidden property:
=sum(Fields!UtilityOrder.Value) is nothing

Open in new window


And now I think about it looks a lot more like bug. Because how can sum(Fields!UtilityOrder.Value) be nothing when Fields!UtilityOrder.Value has a value.
I'm pretty sure it's a bug, but a colleague of mine managed to find a work-around:

1. Remove the grouping on the existing tablix (and name it InnerTablix)
2. Apply the visibility expression to this InnerTablix
3. Drop another matrix on the page, and call it OuterTablix
4. Bind the same dataset to this OuterTablix
5. Configure the row and column groups as before
6. Delete extra rows and columns

So far, it has worked for 2 examples.
Thanks again, Nicobo
Jeff
Your suggestion got me on the right track.. even if there's an underlying bug.
Sorry, I missed the "Sum" part in your previous comment. I'll try that again on my next example to fix. Thanks.
Another way to fix it might be using one cell only and place a rectangle in that cell. Inside the rectangle you can place multiple controls (gauges and textboxes). Then you can set the visibility of the rectangle.