Configuring the Report Viewer
The Report Viewer component provides an easy way to view and print reports in a Perspective View. Let's configure the Report Viewer for a report.
This example requires that you already have a report created in your Gateway. You can learn more about creating reports here.
- Drag a Report Viewer component into a view.
- Enter the Path of the report you want to view in the 'source' property of the Property Editor. The data from your report will immediately load into the Report Viewer.
Tip: You can right-click on any report in the designer Project Browser to Copy the full Path of the report.
- Parameters added during report creation are provided as properties in the Report Viewer. Add them under the 'params' object. (The example below uses the EndDate and StartDate parameters). The parameter names must match exactly to the parameters in your Report Resource, and will override any default values set in the Report Resource. The Report Viewer also allows you to bind your report parameters in your view.
Report Viewer Properties
Once you are ready to view your report in the Report Viewer, set the 'source' property to your report. If you have parameters defined in the Report Source, you can configure them under the 'params' object, but the parameter names must match. The parameter values configured in the Report Viewer will override the values in the Report Source.
You can pick a starting page using the 'page' property. Each time another page is viewed, the 'page' property value will be updated.
You can specify a desired 'zoomLevel' and every time the zoomLevel changes, the property value will also be updated.
You can customize the visual style of your report by creating a new style for your report such as changing the background colors of the viewer (not the report page), changing to a style class that was already defined in your project, or creating a new style.
The 'allowDownload' and 'allowOpenInTab' properties allow you to view and print your report.
To see the property descriptions, refer to the Perspective - Report Viewer page.
Using the Report Viewer
Once you have your report designed, it can be viewed one page at a time using the navigational controls across the bottom of the component. You have the option to download a report to your local device or print a report to your local printer using these built-in controls.