Solved

SSRS 2005 IIF RowCount = 0 prevent report from printing

Posted on 2010-11-09
7
1,306 Views
Last Modified: 2012-06-22
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
Comment
Question by:rustypoot
7 Comments
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 34098703
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 34098730
0
 

Author Comment

by:rustypoot
ID: 34098752
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:rustypoot
ID: 34098840
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
 
LVL 14

Expert Comment

by:Emes
ID: 34103875
can you put the report in a rectangle and then set the visibiltiy to true/false based on the row count.

0
 

Author Comment

by:rustypoot
ID: 34103981
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
 
LVL 4

Expert Comment

by:BostonMA
ID: 34239822
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

911 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

21 Experts available now in Live!

Get 1:1 Help Now