Sunday, March 25, 2012

data set reuse in the same report

Is there a way to reuse a data set in a report?
Example:
report has 2 data sets, ds1 and ds2.
ds1 calls a sproc that returns the data.
ds2 use the same data but filters it and displays it in a different
way.
the queries that generate the data are long (over 1 hour) and I don't
want to call the sproc again to generate the same data for ds2.
is there a way to reuse the data from ds1?
thanksOn Apr 10, 11:03 am, "jlemm" <beasyou...@.gmail.com> wrote:
> Is there a way to reuse a data set in a report?
> Example:
> report has 2 data sets, ds1 and ds2.
> ds1 calls a sproc that returns the data.
> ds2 use the same data but filters it and displays it in a different
> way.
> the queries that generate the data are long (over 1 hour) and I don't
> want to call the sproc again to generate the same data for ds2.
> is there a way to reuse the data from ds1?
> thanks
You should be able to reference the data from ds1 via something (an
expression) like this (if using a textbox control):
=Sum(Fields!SomeFieldName.Value, "ds1")
You should be able to reuse the dataset as well in another table
control (via selecting ds1 as part of the general properties), etc;
however, as far as, not re-executing it, I can't say. I would suggest
trying to improve the performance of your query as well (via the Data
Engine Tuning Advisor, SQL Profiler, etc). Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment