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
 Development Tools
 Reporting Services Development
 Conditional execution of dataset??

Author  Topic 

addytude
Starting Member

12 Posts

Posted - 2004-11-16 : 06:31:08
I have a report which contains 90 datasets.
They correspond to various rectangle regions displayed in the report.

The visibility of the rectangle regions can toggled by a flag parameter that i will send as a parameter to the report.

It so happens that i might want to display only a limited number of rectangles, making the others visibility=false.
Unfortunately i think that the datasets filling the data regions will execute even if the regions are themselves not visible.

Is it possible for me to NOT execute the datasets which i know are filling those regions which are not being displayed by me??

Appreciate any help on this.
Thnx

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-16 : 06:56:54
<sarcasm>Are you sure 90 datasets is enough? Why not make it an even 500?</sarcasm>
Go to Top of Page

addytude
Starting Member

12 Posts

Posted - 2004-11-16 : 07:17:45
Well those 90 are mostly independent sql queries and a few calls to stored procs.
Is that a little too much for reporting standards?

But along with ur reply you cud have mailed the answer too!!



quote:
Originally posted by robvolk

<sarcasm>Are you sure 90 datasets is enough? Why not make it an even 500?</sarcasm>

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-16 : 08:05:01
quote:
Is that a little too much for reporting standards?
No, it's a LOT too much. I can't even begin to fathom why you'd need 90 datasets. Frankly I can't see a need even for 10, and if I did I know I'm gonna get a slow report and not much can be done to improve it.

So my big question is, WHY do you need 90 datasets? What are they retrieving?
Go to Top of Page

addytude
Starting Member

12 Posts

Posted - 2004-11-16 : 08:53:18
a lot of data needs to be displayed, from very many tables
also in a single table data is being stored in multiple rows, instead of in one row, multiple columns.

reports are for printing purpose, kind of a complete snapshot
As for speed, it was indeed slow, but with indexing, it improved!
on local dev environment, it took a mere 5 sec, but on live internet maybe 10 secs

thats y i ask can i conditionally fire the datasets

Somebody Answer!!
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-16 : 09:09:56
Why not instead create a view or stored procedure that combines the data you need into one (or at least fewer than 90) datasets? This will be MUCH easier to program and hide the results you don't want.

And don't get angry with someone who is trying to help and pointing out a serious flaw in the method you are currently using.
Go to Top of Page

addytude
Starting Member

12 Posts

Posted - 2004-11-16 : 09:30:45
Hi rob, not getting angry at you! infact i appreciate this talk that we are having, i m just expressing displeasure on the fact that others have not joined in with their views/suggestions.

Maybe i cud reduce from 99 (exact number) to maybe 80+! but these datasets are then linked with tables etc.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-11-17 : 12:28:14
I am pretty sure that you can not conditionally fire the data sets. I don't see how you're ever going to get any performance out of this if you need to make this many calls to the database for one report.

Tara
Go to Top of Page

kselvia
Aged Yak Warrior

526 Posts

Posted - 2004-11-17 : 12:31:37
Maybe;

select * from mytable where @flag = 1 and col1 = @parm1, col2 = @parm2, ...

Then you will get a result with no rows if @flag is not 1.


--Ken
I want to die in my sleep like my grandfather, not screaming in terror like his passengers.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-11-17 : 12:34:15
The data set will still fire though.

Tara
Go to Top of Page

jhermiz

3564 Posts

Posted - 2004-11-17 : 18:08:56
90 data sets ? I thought 5-7 was killing it :).

I think you need to wrap this into some sort of view or preferably stored procedure and get your results like this.
Also what are you selecting from the tables? Hopefully not SELECT * :(.
Can you post one of your reports online and let us take a look at it as well as maybe some DDL and results that you are looking for.

Jon

Go to Top of Page
   

- Advertisement -