rustypoot
asked on
SSRS 2005 IIF RowCount = 0 prevent report from printing
SSRS 2005 IIF RowCount = 0 I want to prevent the report from printing a header and blank page (no data). The reports all use TSQL stored procedures.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The Header & Footer appear not to have visibility properties.
The Goal is IIF RowCount =0 then Prevent Report from being printed ( basically RowCount = 0 there are no records in dataset).
I have the RowCount working -- I do not how to stop report. Can it be stopped in Custom Code (VB) ?
Is there a Report property I can use ?
The Goal is IIF RowCount =0 then Prevent Report from being printed ( basically RowCount = 0 there are no records in dataset).
I have the RowCount working -- I do not how to stop report. Can it be stopped in Custom Code (VB) ?
Is there a Report property I can use ?
ASKER
Since there is a stored procedure and I can capture RowCount too- could I stop SQL query and stop SSRS from processing report ? Either way I need to STOP Report from printing when RowCount is Zero from dataset !!!
can you put the report in a rectangle and then set the visibiltiy to true/false based on the row count.
ASKER
Yes I can make table visibility & objects visibility in header(s) be hidden. But it will still generate a blank sheet.
I was looking for a way to STOP the Report based on RowCount =0 without printing.
I was looking for a way to STOP the Report based on RowCount =0 without printing.
I have some ideas for how to acheive this, but first I want to be clear on what you are trying to acheive. If there is no data returned in the Stored Procedure, what do you want to see in the report? You say you want to Stop the report, does that mean prevent it from running? That is if you have it sent through a subscription you would like the subscription not to be sent?
http://msdn.microsoft.com/en-us/library/ms159677(SQL.100).aspx