How can I get Multiple reports (with deferent query) in one report using data dynamic active reports
2
votes
3 Answers
8
votes
You can also create multiple reports, call Run() on each and then merge them together using ActiveReport.Document.Pages. Nice way to keep logic completely separated and merge documents together.
something like:
ActiveReport report1 = new ActiveReport();
ActiveReport report2 = new ActiveReport();
report1.Run();
report2.Run();
report.Document.Pages.AddRange(report2.Document.Pages);
//do your exporting as normal
1
votes
@Mehdi,
The solution provided by karnqu is better since merging not only saves memory but also avoids making use of multiple subreport controls on the main report which might be more time consuming when it comes to designing of reports. You may want to check this blog article which provides information on report merging and a working example.
Thanks,
Sankalp