Solved

SSRS 2005 IIF RowCount = 0 prevent report from printing

Posted on 2010-11-09
7
1,299 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

746 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

10 Experts available now in Live!

Get 1:1 Help Now