I'd like to be able to put a full page loader while our application is exporting a previously rendered & currently displaying report to pdf / excel. This means being able to run client side code once the export has finished. Is this possible?
We have our current report viewer set up as follows:
<telerik:ReportViewer ID="Viewer" runat="server"
Width="100%" Height="100%" ClientIDMode="Static"
ParametersAreaVisible="False" ViewMode="PrintPreview"
ToolbarVisible="false" DocumentMapVisible="false" Skin="Promapp" SkinsPath="~/Content/Skins">
</telerik:ReportViewer>
When the user clicks on the PDF icon above this viewer we call this javascript code:
ExportReport: function (exportType) {
if (typeof Viewer === "undefined") { return; }
Viewer.ExportReport(exportType);
},
So, ideally what I'd like to do is in this ExportReport function call our existing Loader() jquery function, and then have a callback function defined once the export has completed which can have our existing LoaderRemove() function. How exactly can I define this callback - is there an OnReportExported event?
Other threads have mentioned as a possibility to define a custom server-side function in our code that will export the report programatically as explained here (http://www.telerik.com/help/reporting/programmatic-exporting-report.html). We could then have our own ajax call to an action that will do this. However, from this post it is not clear how to exactly pass in the currently displayed report instance - since that is already rendered on the screen prior to the user being able to click the export button. How exactly do you pass in this report instance? Is there an ID or something you can pass in, and a telerik method that you can call to retrieve it?
Thanks to anyone who can reply.
Paul
We have our current report viewer set up as follows:
<telerik:ReportViewer ID="Viewer" runat="server"
Width="100%" Height="100%" ClientIDMode="Static"
ParametersAreaVisible="False" ViewMode="PrintPreview"
ToolbarVisible="false" DocumentMapVisible="false" Skin="Promapp" SkinsPath="~/Content/Skins">
</telerik:ReportViewer>
When the user clicks on the PDF icon above this viewer we call this javascript code:
ExportReport: function (exportType) {
if (typeof Viewer === "undefined") { return; }
Viewer.ExportReport(exportType);
},
So, ideally what I'd like to do is in this ExportReport function call our existing Loader() jquery function, and then have a callback function defined once the export has completed which can have our existing LoaderRemove() function. How exactly can I define this callback - is there an OnReportExported event?
Other threads have mentioned as a possibility to define a custom server-side function in our code that will export the report programatically as explained here (http://www.telerik.com/help/reporting/programmatic-exporting-report.html). We could then have our own ajax call to an action that will do this. However, from this post it is not clear how to exactly pass in the currently displayed report instance - since that is already rendered on the screen prior to the user being able to click the export button. How exactly do you pass in this report instance? Is there an ID or something you can pass in, and a telerik method that you can call to retrieve it?
Thanks to anyone who can reply.
Paul