This is a migrated thread and some comments may be shown as answers.

Creating report programmatically with TRDX template

1 Answer 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 19 Feb 2018, 11:31 AM
Hi, how can i create a report  programmatically  using TRDX template. In particular, I am interested in putting my custom collection in DataSource.

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 22 Feb 2018, 04:52 PM
Hello Alex,

It is possible to create report definition dynamically using a TRDX template, but this is no trivial matter and we do not recommend it.
Report definition is quite complex and creating it on the fly might lead to errors.

If, however, this is necessary, you should deserialize the TRDX report/template using the ReportXmlSerializer Class to get all objects from the report definition. Then you could modify the report definition (including DataSource property) and serialize it back. Check this article for details and examples.

For creating reports programmatically I suggest you to review also the 
Programmatic Control of Reports and the Reporting API Reference chapters from our official documentation.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or