Dynamically updating exportsSettings in exports viewer mode

Posted by: rishi.karki on 16 July 2025, 2:45 pm EST

    • Post Options:
    • Link

    Posted 16 July 2025, 2:45 pm EST

    Hello,

    I’m using @grapecity/activereports-angular version 4.2.2, and I’m trying to dynamically set the filename for PDF and XLSX exports.

    Currently, when the export options window is displayed in the viewer, it always uses a static default filename. Even though I’m updating the exportSettings parameter dynamically, the viewer continues to use the initial value that was set when the ActiveReports viewer component was first rendered or initialized.

    Here’s how I’m binding the export settings:

    <gc-activereports-viewer

    [availableExports]=“[‘pdf’, ‘xlsx’]”

    [exportsSettings]=“exportSettings”

    …>

    It seems the updated exportSettings value is not being propagated to the viewer after the component is initialized.

    Is it possible to trigger a re-render or force the viewer to recognize changes to the exportSettings parameter at runtime?

    Any guidance or recommended approach would be appreciated.

  • Posted 17 July 2025, 2:18 am EST

    Hi Rishi,

    Yes, the file name that appears in the Export Sidebar pane can only be specified at the time of initializing your viewer (each export type can have one unique file name specified at initialization) and cannot be changed dynamically.

    However, if in your use case you are not limited to exporting your report only using the ActiveReports export panel i.e. if you can use a custom button/code to export your report then you can use the ‘download’ method in the Export API which takes fileName as a parameter so you can dynamically specify the fileName you want to export your report with.

    You can learn more about the same here: API-HTMLExport.

    For code reference, you can check our documentation Printing and exporting the report output.

    Regards,

    Anand

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels