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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Main report and Sub report

Author  Topic 

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2012-08-29 : 10:44:12
Hi,

I have a main report Report1 calling sub report Report2 with parameter City.

I have a data set D1 in Report one which returns list of cities in order( example - Hyderabad,Bangalore,Delhi,Mumbai). So the city is passed to the sub report.
So for each city the sub report is called.

I have a problem, the cities are passed in the order mentioned above. But the sub report is displayed in different order (Bangalore,Delhi,Hyderabad,Mumbai).

I wanted the order to be same as the order of dataset D1.

Kindly let me know how to achieve this.


Thanks,
Sandesh

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-29 : 17:23:09
you need to return a orderby field along with dataset with values as per your order. then use it inside subreport to sort the results. I hope subreport also uses same dataset else you need to add it in its query as well

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

Go to Top of Page

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2012-09-04 : 04:03:24
Thank you Visakh.

Thanks,
Sandesh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-05 : 21:55:34
welcome

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

Go to Top of Page
   

- Advertisement -