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
 2 Dataset in SSRS

Author  Topic 

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-11-01 : 07:13:22
Hi All,

I have 1st Dataset fetching data from Stored Procedure. The store Producre have some transaction & will dump the data into a table eg: tbl_sum.

Then i would like my 2 Dataset to fetch data from eg: select ID, Type,Cost=Sum(Cost) from tbl_sum group by AID, Type

Now i having issue, when run the report. The 2 dataset table return no value.

How can i solved this issue?

Please advise.

Thank you.

Regards,
Micheale

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-11-01 : 07:59:52
How are you creating the second data set? Does it have its own query? (It should). If that is true, and if the second dataset does not show any data, run the query from SSMS and see if that returns any results.

Based on what you said, you may not need a second data set. You can do the aggregation in the report itself if all you want to do is calculate the sum grouped by type and id.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-01 : 09:52:16
quote:
Originally posted by micnie_2020

Hi All,

I have 1st Dataset fetching data from Stored Procedure. The store Producre have some transaction & will dump the data into a table eg: tbl_sum.

Then i would like my 2 Dataset to fetch data from eg: select ID, Type,Cost=Sum(Cost) from tbl_sum group by AID, Type

Now i having issue, when run the report. The 2 dataset table return no value.

How can i solved this issue?

Please advise.

Thank you.

Regards,
Micheale


you should ideally be wrapping them in same procedure as first one is just a population step (i dont understand the reason for calling it from dataset in report in the first place). If you want to keep population procedure separate create a procedure for retrieving data which acts as source for 2nd dataset and call first procedure inside that for the population of data and then doing aggregation on tbl_sum

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -