SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 2 Dataset in SSRS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

micnie_2020
Posting Yak Master

Malaysia
225 Posts

Posted - 11/01/2012 :  07:13:22  Show Profile  Reply with Quote
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

5155 Posts

Posted - 11/01/2012 :  07:59:52  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 11/01/2012 :  09:52:16  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000