Customise HTML5 report viewer template export mechanism

2 posts, 0 answers
  1. Amrita
    Amrita avatar
    3 posts
    Member since:
    May 2016

    Posted 17 May Link to this post

    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?




  2. Stef
    Stef avatar
    2933 posts

    Posted 19 May Link to this post

    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.

    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
  3. DevCraft banner
Back to Top