Solved

SSRS 2005 IIF RowCount = 0 prevent report from printing

Posted on 2010-11-09
7
1,325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 53

Accepted Solution

by:
Huseyin KAHRAMAN 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 53

Expert Comment

by:Huseyin KAHRAMAN
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Suggested Solutions

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

732 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