Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Not diplaying the dataset with no record.

Author  Topic 

nitsmooth
Yak Posting Veteran

68 Posts

Posted - 2009-12-08 : 07:52:40
Hi all, i have created a report with multiple datasets(associated tables) and for some datasets there are no records sometimes.
Now what i want is not to show the datasets(tables) for which there are no records.
Is this possible that we donot show the datasets which donot return any records and to show only those with records, all in a single report.

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2009-12-08 : 08:44:47
Huh?

Can you give us the data structure, some sample data, and the output you'd like for that sample data. These double negatives are very hard to follow...


Ryan Randall - Yak of all trades
Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

nitsmooth
Yak Posting Veteran

68 Posts

Posted - 2009-12-08 : 09:49:59
Hi Ryan,
Thanks for looking into this

i have multiple datasets in a single report .... now for some cases(some dateranges) some datasets dont get no records when the report is run

so i get empty tables for these datasets

now i do not want to show the tables for these empty datasets in the report

but i do want to show the tables for the datasets which get data in them when the report is run

so is it possible that we can diplay only those dataset tables which get any records in them and leave off the empty dataset tables

plz note all datasets are in a sigle report only

Have i been clear enough ??
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2009-12-08 : 10:20:07
Presumably you need to either configure something in your reporting tool or change something in the thing that supplies data to the reporting tool.

What's supplying the data to the reporting tool? What reporting tool are you using?

Ryan Randall - Yak of all trades
Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

nitsmooth
Yak Posting Veteran

68 Posts

Posted - 2009-12-08 : 13:16:33
SSRS
Go to Top of Page

nitsmooth
Yak Posting Veteran

68 Posts

Posted - 2009-12-10 : 02:13:00
Hi Ryan actually i have made the visibility expression for a dataset as "=IIf(CountRows()=0,true,false)". So now if there are no records for the dataset, the dataset is not visible at all. But nw what i want is that if all the datasets in a report are not visible then the report should not be generated at all. Actually i have scheduled the report to run every hr.
Go to Top of Page
   

- Advertisement -