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

Customise HTML5 report viewer template export mechanism

1 Answer 168 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amrita
Top achievements
Rank 1
Amrita asked on 17 May 2016, 06:13 AM

I am using Telerik HTML5 Report Viewer Template where there are options to export PDF,CSV etc. Getting an out of memory exception while exporting to PDF because report has lot of images.

 I am setting DataMember attribute to a method name to fetch report data. DataMember method is called in many instances like when report is being loaded or exported or when previewed.

Is there a mechanism by which I can get the information about what triggered the DataMember method.

For e.g. if Export to PDF is clicked how can I know that Export to PDF has triggered the DataMember method.

I also need suggestion on following stuff.

If I create a custom export to PDF button by modifying Telerik HTML5 Report Viewer Template

1. How can I hook my server side API to that button?

2. How can I pass the report parameters to that API?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 19 May 2016, 12:21 PM
Hello Amrita,

In case the application is hosted in Azure, please check GDI+ error or OutOfMemoryException on exporting or printing Telerik report from Azure WebSites.

About controlling the export, you can export a separate instance of the report programmatically - Exporting Report Programmatically. With this approach you will know which rendering format will be used and can decide whether to modify the report before processing and rendering it.


About data, each data item has a DataSource property which is executed per processing data item. For example, there is a report bound to ObjectDataSource1 and a Table item in its Detail section also bound to ObjectDataSource1, on processing ObjectDataSource1 will be called by the report and then for each displayed Table item.
Approaches for optimizing the data-retrieval in a report are elaborated in Use DataObject as a datasource for nested data items (Table, List, Crosstab, Graph) and How to Databind to Collection Properties.



I hope this information is helpful.

Regards,
Stef
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
Amrita
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or