Report Viewer Component for Perspective

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:

image

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. The Fit Panel option is simply 1 as opposed to a percentage value.
  • allowDownload (Boolean, required) - If set to true, 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 to true, 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.
5 Likes

Is it possible to download desired report on fly without using this component with in perspective?

Sure, you would just pair system.perspective.download with system.report.executeReport.

1 Like

Thanks is it there any way to add this component to v8.0.6?( By copying some files from 8.0.9 to 8.0.6)

No.

1 Like

5 posts were split to a new topic: Export Perspective report to Excel

Hi, is it possible to pass a parameter from perspective screen Report viewer component i.e. start date and end date . Its super easy in Vision module as in report viewer tool it shows all parameters and we can easily bind any tag or property with it.
Thanks.

Hi @shabir.ahmed, they are passed in via the props.params in the component properties. Please refer to here for more information.

Hi @matthew.ayre thanks a ton, it worked for me.

1 Like