Visibility of a Blank Sub Report
-
Friday, January 04, 2013 12:37 PM
Hi to everyone,
I would like to ask if there is any property so that to keep a sub report visible even if it is blank (contains no data rows) when executing the main report. I want to keep the sub report headers visible as a sub-section of the main report.
Thanks in advance
All Replies
-
Friday, January 04, 2013 12:47 PM
Hello,
We can not have header and fotter section of the sub report into main report only detail section of sub report is visible in main report.
You can do one thing insert a header row in your sub report tablix and use that as header just an idea
blog:My Blog/
Hope this will help you !!!
Sanjeewan
- Edited by Sanjeewan Kumar Friday, January 04, 2013 12:52 PM
-
Friday, January 04, 2013 12:49 PM
This is not a supported feature of SSRS:
http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/77af0687-1726-425c-b6d4-fadae606f337
Regards,Eshwar.
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
-
Friday, January 04, 2013 12:51 PM
Let me come again,
I would like to ask if there is any property so that to keep a sub report visible even if it is blank (contains no data rows) when executing the main report. I want to have the subreport table columns with no data demonstarated in the main report.
thanks in advance
-
Friday, January 04, 2013 12:53 PM
Hi,
Maybe you can try putting a static text box on your sub report, white font, outside of the header, between the header and your tablix and make the height 0.1 or barely visible. That will keep the report visible.
Hope this helps! k r o o t z
-
Friday, January 04, 2013 12:57 PM
Hello,
Subreports have a NoRows property. If a message is set for the NoRows property, and the subreport doesn't return data at runtime, then no subreport contents is shown, but the NoRows message instead.
Put your message Data not available
- Edited by Sanjeewan Kumar Friday, January 04, 2013 1:03 PM
-
Friday, January 04, 2013 1:31 PM
is it possible to demonstarte the subreport contents (even if that contain no data, as subsection of the main report) when subreport does not return data at runtime?
-
Friday, January 04, 2013 1:35 PM
Hello Tassos,
Not sure but I think no. give a try to this just go to sub report columns and check in expression like this
=iif (len(Fields!ABC.Value)>0,Fields!ABC.Value,"-") in each column
blog:My Blog/
Hope this will help you !!!
Sanjeewan
- Edited by Sanjeewan Kumar Friday, January 04, 2013 1:35 PM
-
Friday, January 04, 2013 1:48 PM
Hi,
Ok, I see what you mean.
Modify the SQL on your subreport and add:
UNION SELECT NULL FROM DUAL
This will always add a blank record so the subreport will display the header.
You have to modify your subreport parameter to accept nulls.
This should work!
Hope this helps! k r o o t z
- Marked As Answer by Tassos85 Friday, January 04, 2013 3:32 PM
-
Friday, January 04, 2013 1:52 PM
hello Sanjeewan,
Unfortunately it did not work. however, thanks for your help.
-
Friday, January 04, 2013 2:02 PM
Hello,
Do some thing in your query, Create a temp table with all column you are using in report insert value zero in that and left join that in this every time you have zero in against each columns and you have all the tablix header in Main report
blog:My Blog/
Hope this will help you !!!
Sanjeewan -
Friday, January 04, 2013 2:49 PM
Hi Tasso85,
Have you tried my suggestion above? I tested it and it worked for me.
Hope this helps!
k r o o t z -
Friday, January 04, 2013 3:32 PM
Dear Krootz
it seems to work properly at a first glance.
Sanjeewan thank you as well for your valuable help

