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
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Report with 2 datasets (Formatting Question)

Author  Topic 

chrpeter
Starting Member

31 Posts

Posted - 2008-04-16 : 14:55:20
I have a report with two datasets(and two tables). They both have a field in common(a customer code).

I want the results to be one customer per page.
This isn't a problem when using one dataset, because I can just group by customer_code and page break at the end.

But in this case I need the customer info from the second dataset to be on the same page as the customer info from the first set.

Does anyone have any formatting tips on this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-17 : 00:08:21
Try putting all the data into single table by mapping it to a dummy dataset and refer fields by specifying its scope with dataset name. Group by any one customercode field from first or second dataset and put a page break.

ex: Sum(Fields!yourfield1.value,"dataset1"),Sum(Fields!yourfield2.value,"dataset2")etc
Go to Top of Page

chrpeter
Starting Member

31 Posts

Posted - 2008-04-17 : 09:47:33
OK this sounds promising. How do I specify the scope on a single field (without using an aggregate function?) Is it just =(Fields!fieldname.value,"Dataset1")
Go to Top of Page

chrpeter
Starting Member

31 Posts

Posted - 2008-04-17 : 11:15:30
OK =(Fields!fieldname.value,"Dataset1") that doesn't work.

How do I specify the scope of a field that isn't used in an aggregate function?
Go to Top of Page

tm
Posting Yak Master

160 Posts

Posted - 2008-04-17 : 12:10:58
From your explanation you can use 3 options.

1. Use one dataset by combining aggregates with your data to form one dataset (Sub Queries)
2. Use List item and group by customer code. The list item will be the container for your table item or what ever item you need to display your information. You will need to set List group and table group etc.
3. Use Sub Reports to display additionl information passing Customer Code to sub report each time. Using sub report will most probably be slower.
Go to Top of Page
   

- Advertisement -