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
 Two Data Sources

Author  Topic 

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-07-08 : 00:43:51
Hi all I have yet another question. I need to have two datasources for a report that has two tables in it, now the reason being is because one table is to give totals for the shool year and the other table is to give totals for the summer school. so its going to be different totals in both tables. And each table has its own datasource. The user wants to see both totals for summer school and year round school. How do I do that??? Any advice would be greatly appreciated.

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-07-08 : 02:31:31
sorry I mean Dataset not datasource sorry
Go to Top of Page

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-07-08 : 02:54:15
Did u want this??

select id,sum(total) as grand_total from
(select id,total from table1 union select id,total from table2) tab1
group by id

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-08 : 13:15:38
or is it this?

select id,,cat,sum(total) as grand_total from
(select id,total,'summer school' as cat from table1 union select id,total,'other schools' from table2) tab1
group by id,cat
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2009-07-09 : 14:28:17
You can build equations in Reporting Services Fields that refer to other fields (textboxes). I recommend you name the ones that you are going to put in your equation. So, for example, build your table for year-round school, with total in the footer. Name the textbox where the total goes as YearRoundTotal. Add a second table for summer school and do likewise, naming the total SummerTotal. Then, create a free-standing textbox on the report below the second table and insert the equation =Fields!YearRoundTotal.Value + Fields!SummerTotal.Value.

--------------------------------------------
Brand yourself at EmeraldCityDomains.com
Go to Top of Page

greensun
Starting Member

7 Posts

Posted - 2009-08-26 : 00:30:43
RAQ Report can meet your needs. It's a free excel-like java reporting tool. You can have a try. You can get free RAQ Report at http://www.raqsoft.com/.
Go to Top of Page
   

- Advertisement -