Solved

SSRS - Non-existent row/column group appearing

Posted on 2014-10-22
7
1,385 Views
Last Modified: 2014-10-23
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:

Design View
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:

Gauge screen output
Why is the 4th panel appearing when UtilityOrder=4 doesn't exist?

Thanks,
Jeff
0
Comment
Question by:jdallen75
  • 4
  • 3
7 Comments
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 500 total points
ID: 40398779
The cell in the matrix is there because there is a row an a column for it. There just no value in the cell. With normal text fields these would come up empty most of the time, so you won't notice. But now there is a gauge in the cell so you get a gauge without a value. The solution is to use the Hidden propery of the gauge to hide it when there is no value. You can do this by setting the hidden propery to:
=Fields!UtilityOrder.Value is nothing

Open in new window

You can do this in the properties list directy or in the Gauge Panel Properties window in the Visibility section in the 'Show or hide based on an expression' field.
0
 

Author Comment

by:jdallen75
ID: 40399435
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:

Almost hidden!
Any thoughts?
0
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 40399775
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.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:jdallen75
ID: 40399964
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
0
 

Author Closing Comment

by:jdallen75
ID: 40399967
Your suggestion got me on the right track.. even if there's an underlying bug.
0
 

Author Comment

by:jdallen75
ID: 40399970
Sorry, I missed the "Sum" part in your previous comment. I'll try that again on my next example to fix. Thanks.
0
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 40400176
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.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now