Viewer Events
Information |
Since dashboards and reports use the same unified template format - MRT, methods for loading the template and working with data, the word “report” will be used in the documentation text.
|
The HTML5 Viewer component supports events that allow you to execute necessary operations before specific actions, such as printing and exporting, sending reports by email, interactivity, etc. Below is a sample of processing viewer events.
Default.aspx |
... <cc1:StiWebViewer ID="StiWebViewer1" runat="server" OnExportReport="StiWebViewer1_ExportReport"> </cc1:StiWebViewer> ... |
Default.aspx.cs |
... protected void StiWebViewer1_ExportReport(object sender, StiExportReportEventArgs e) { if (e.Format == StiExportFormat.Pdf) { StiPdfExportSettings pdfSettings = e.Settings as StiPdfExportSettings; pdfSettings.ImageQuality = 50; pdfSettings.ImageResolution = 50; pdfSettings.ImageCompressionMethod = StiPdfImageCompressionMethod.Jpeg; } } ... |
List of events
|