| Author |
Topic  |
|
|
micnie_2020
Posting Yak Master
Malaysia
188 Posts |
Posted - 11/01/2012 : 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
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 11/01/2012 : 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. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47040 Posts |
Posted - 11/01/2012 : 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/
|
 |
|
| |
Topic  |
|
|
|