Alex Rogers
Top achievements
Rank 1
Alex Rogers
asked on 05 Aug 2013, 09:20 PM
Hi
I am wanting to do something like the Product Catalog example where I have a long list of the same "report" that has different data in it. Unfortunately, my data is generated dynamically at runtime and I cannot tie it to a sql table. I have tried adding all my reports which I generate into a report book, but it creates a page break after each report and I don't want that but otherwise the functionality is what I want. Is there a way to add multiple subreports dynamically? I have also seen the example here: http://www.telerik.com/community/forums/reporting/telerik-reporting/113406-sub-reports.aspx but my data will also not always be the same size so it would be difficult to specify size and location.
Alex
I am wanting to do something like the Product Catalog example where I have a long list of the same "report" that has different data in it. Unfortunately, my data is generated dynamically at runtime and I cannot tie it to a sql table. I have tried adding all my reports which I generate into a report book, but it creates a page break after each report and I don't want that but otherwise the functionality is what I want. Is there a way to add multiple subreports dynamically? I have also seen the example here: http://www.telerik.com/community/forums/reporting/telerik-reporting/113406-sub-reports.aspx but my data will also not always be the same size so it would be difficult to specify size and location.
Alex
5 Answers, 1 is accepted
0
Squall
Top achievements
Rank 1
answered on 06 Aug 2013, 02:57 PM
You have to calculate the textboxes width and location dynamically according the number of fields you want to render. This way you can control the layout and generate subreports based on random number of fields. Then use that report definition as subreport as explained in the forum you have found.
SN
SN
0
Alex Rogers
Top achievements
Rank 1
answered on 06 Aug 2013, 06:15 PM
I would like to make a suggestion for a feature. I think a Reportbook with the option to not include the mandatory page break after each report would be an easy way to add this functionality to the reports. I think that would add a lot of flexibility to your product.
Alex
Alex
0
Hello Alex,
Petio Petkov
Telerik
You can achieve this functionality by creating a master report with all the needed reports in it as SubReports. Using this approach all the reports will be processed as one and you can control the page break.
In case of the ReportBook all reports are processed separately - one by one. That's why there will be a page break after each report.
Petio Petkov
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
0
Alex Rogers
Top achievements
Rank 1
answered on 12 Aug 2013, 07:51 PM
well that doesn't really provide the same functionality. You can add unlimited number of "duplicate" reports to the report book at runtime, (if I wanted to run a report on A company, add it, then B company, etc; same report, different data) but your suggestion would only allow me a certain number that is configured at design time. I have implemented what I needed by manually calculating where to put the subreports in the detail section, but I think something automatic would be very helpful.
Alex
Alex
0
Hello Alex,
We are glad to hear you have found a solution to your case.
Just in case it might be helpful for you, we have attached a sample project illustrating a scenario of adding multiple times the same sub report with different data to a single report document.
Regards,
Stef
Telerik
We are glad to hear you have found a solution to your case.
Just in case it might be helpful for you, we have attached a sample project illustrating a scenario of adding multiple times the same sub report with different data to a single report document.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.