Report Viewer Component
This component will be added in an upcoming nightly build. Embedding reports from the Reporting Module in views is now possible with the addition of this component. As long as the Reporting Module is installed, you’ll see the Report Viewer component at the bottom of the Perspective Components palette:
It’s super easy to get this component configured; just create a report and provide the path and name of that report in the source
property of this component. You can pick a starting page using the page
property, specify a desired zoom level, and add any additional style that you’d like. The report can be viewed a page at a time using the navigational controls across the bottom. You can specify any parameters that you are using in the report as values under the params
property, and the values specified will be used in lieu of the default report parameters. This component is also mobile-friendly and has a responsive design as its size is modified to fit smaller screens.
Properties
Listed below is a breakdown of the properties for this component:
-
source (
String
, required) - The path and name of the report (case sensitive) from the Reporting Module that this component should display. If the report exists under a folder structure, that structure will need to be provided. -
params (
Object
, required) - An object that you can enhance with report parameters that you would like to use in your report. -
page (
Number
, required) - The page that should be displayed within the report. This property is also updated as the pages are viewed. -
pageCount (
Number
, required) - A read-only property that will provide the total number of pages for the report. -
zoomLevel (
Number
, required) - A number representing the desired zoom level as a percentage of the report width. TheFit Panel
option is simply1
as opposed to a percentage value. -
allowDownload (
Boolean
, required) - If set totrue
, an icon will be added to the control bar at the bottom of the component that will download the report as a PDF file when clicked. -
allowOpenInTab (
Boolean
, required) - If set totrue
, an icon will be added to the control bar at the bottom of the component that will open a temporary PDF file in a new tab. -
controlStyle (
Object
, optional) - An object containing CSS style properties that are applied to the control bar and controls across the bottom. -
style (
Object
, optional) - An object containing CSS style properties that are applied to the background display of the component.