Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1359
  • Last Modified:

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.
0
rustypoot
Asked:
rustypoot
1 Solution
 
HainKurtSr. System AnalystCommented:
is tehre any event on report like "after query open" or similar to this
so you can use

page.header.visible = IIF(Countrows("Scope") = 0, True, False)

(or use this in componetes hidden/visibility property)
 
0
 
HainKurtSr. System AnalystCommented:
0
 
rustypootAuthor Commented:
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 ?
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
rustypootAuthor Commented:
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 !!!
0
 
EmesCommented:
can you put the report in a rectangle and then set the visibiltiy to true/false based on the row count.

0
 
rustypootAuthor Commented:
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.
0
 
BostonMACommented:
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?
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now