Showing posts with label SQL 2008. Show all posts
Showing posts with label SQL 2008. Show all posts

Thursday, November 1, 2012

Supress empty subreports in SSRS 2008



Creating a report in SSRS 2008 that collaborates other sub reports. These Sub Reports will show up with some conditions. If Sub Reports are not satisfying condition its showing empty. I'd like to be able to exclude this from the master report so it does not leave a blank page. 

Struggled 1 day and got the solution.

Resolution: 
Place the sub report into a rectangle. Then set the visibility of the rectangle expression as

=iif(First(Fields![Field1].Value, "[SubReportDataSet]") IS NOTHING, TRUE, FALSE)

Add New Dataset to Main Report as [SubReportDataSet] is a Dataset of Sub Report used to populating the subreport. If the subreport is empty, then [SubReportDataSet] will also be empty, and the field [Field1] will be equal to NOTHING.

Note: The SQL server will be sending the same information twice, once to check is subreport dataset has any Data from the Main Report, and again to populate the date in subreport.

Wednesday, October 31, 2012

PDF or Image Render produces extra blank page when subreport contains pagebreak


PDF or Image Render produces extra blank page when sub report contains page break.

This is almost always caused by the Body of your report being too wide for your page. Make sure that the Width of the Body is less than the physical page size, less the margins.


Thanks to both the Sites.






Tuesday, October 9, 2012

Repeating Tablix Column Headers with SSRS 2008



Repeating Tablix Column Headers with SSRS 2008
 
There seems to be an issue with repeating column headers using SQL Server 2008 Reporting Services. Typically you would highlight the row, right-click and select properties then you would be able to set the property for RepeatOnNewPage to True. I tried it and it does not work for SSRS 2008 R2.


Work Around:
Click on Black Arrow, at Right Side In your grouping pane, select advanced mode, then select your outermost static row; Click F4 or open Properties Window. You should then see the "RepeatOnNewPage" property and KeepwithGroup.
Set KeepwithGroup as --- After (None, Before and After)
RepeatOnNewPage ---True
 
Happy Reporting!!!