问题
How can I open 2 seperate reports in 1 crystal reports viewer at a single time?
And when previewing the report, I see that my subreport doesn't filled its parent control width, how to Subreport width fill its parent width?
I use crystal reports for visual studio 2010.
回答1:
As far as I know you can't have multiple reports show in the same viewer as the report gets bound to the viewer. Now there are some ways of getting around that and making it look like you have multiple reports showing in one viewer:
1) You could append multiple viewers to your page and suppress all toolbars.
2) You could make each of the reports into a subreport and put them into one report.
3) If the report is not going to be interactive(ie - paging, links, drill down, etc) you could just generate pdf's for each report and merge them.
And about your subreport not showing correctly: you need to format the subreport seperately to make it fit your page. Just formatting the subreport container will not help, you have to format the subreport itself.
Hope that helps!
Chris
来源:https://stackoverflow.com/questions/19570074/how-to-view-multipe-reports-in-1-crystal-reports-viewer