I want design a report with a table, but the number of columns is dynamic. How I can do it? I receive data from a Stored Procedure.
If you can, please send an example.
Best Regarsd,
Marcelo Videira
1 Answer, 1 is accepted
0
Stef
Telerik team
answered on 20 Nov 2013, 05:04 PM
Hi Marcelo,
The best approach is to start by creating a sample Table item using the provided reporting designer and Table Wizard. Then get the code generated by the designer in the report's designer.cs(vb) file. This will help you get more familiar with the Table item structure and create code generating Table item based on provided data schema (number of columns and column names).
As it is not recommended to modify the report definition once the processing has started, add the dynamically created Table item to the report instance Items collection, before displaying the report:
reportViewer1.ReportSource = new InstanceReportSource{ ReportDocument = report };
I hope this information helps you.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.