Skip to main content Skip to footer

How to export a report with a custom name in HTML5 viewer with ActiveReports

Background:

This KB article shows how to export the report with custom name in HTML5 viewer. When you export through the Html5 viewer, it is not given the option to change the name of the exported file. It always exported with the name of “ActiveReports”.

Steps to Complete:

1. You can use the following code to change the name of the exported file.

viewer.export('PDF',  function (uri) {
                var newWin = null;
                try {
                    newWin = window.open(uri);
                } catch (e) { }
                if (!newWin) {
                    window.location = uri;
                }},
                true, {
                FileName: 'AnyValidName.pdf'
            });

Mohit Garg