Link a custom dashboard Widget to a report

Document ID : KB000034044
Last Modified Date : 14/02/2018
Show Technical Document Details
You can setup running a report through a direct URL in jasperserver.

The instructions for setting up a URL for the report can be found in the following document:
Pages 6-10 (PDF page 10,11)

A report execution URL has the following syntax:

<JS deployment context>/flow.html?_flowId=viewReportFlow&<report execution parameters>

The first part is the base URL of the JasperServer deployment, for instance


if JasperServer is deployed as jasperserver-pro on the server machine <UMP Server> on port 80.

The report execution parameters can be either reserved parameters used by JasperServer to determine general attributes of the report execution, or arbitrary parameters that correspond to the report input controls/parameters.? The parameters are specified as standard HTTP GET parameters, i.e. in the form of name=value and separated by & characters.

The following general parameters are recognized by JasperServer:

The URI of the report unit resource in the JasperServer repository.

(optional) Specifies the desired report output format.? If it is not present or html is used as the value for the parameter, the default JasperServer report viewer is used as output.? Other values for this parameter are given by the report exporters configured in JasperServer. By default, JasperServer recognizes the following output types:
?? pdf - for PDF
?? xls - for Excel
?? rtf - for RTF
?? csv - for CSV
?? swf - for the JasperServer Flash report viewer

Used to pass the locale in which the report is to be executed.? A locale is passed as code consisting of a lower-case two letter ISO-639 language code, followed by optional upper-case two letter ISO-3166 country code and a locale variant, separated by underscore (the format is identical to the standard Java locale programmatic names).

-j_username and j_password
Can be used to pass the credentials to be used to authenticate a user with JasperServer.? The username should correspond to a valid JasperServer user, and password should be the user password (in clear text).? If such credential parameters are not present, and no authenticated JasperServer session exists, and JasperServer is not configured to use automatic authentication mechanisms (such as Single sign-on), the user accessing a report execution URL will be first required to provide a username and a password on the login screen, and then redirected to the actual report execution screen.? The two authentication parameters can be used to skip the login screen and have the user directly presented with the report execution screen.

Note that these two parameters are not specific to report execution URLs, they can be used for any URLs that point to a JasperServer web page.

Full Example of a sample URL:
http://<UMP server>/jasperserver-pro/flow.html?_flowId=viewReportFlow&reportUnit=/servers/top20_servers_by_cpu_usage&standAlone=true&ParentFolderUri=/servers&test=true&test2=true&output=pdf

Once you have this configured so that the report is executed from the URL, you would then add a custom Context Selector widget to your dashboard where you can specify the URL where your report is executed from. The following link provides the instructions for setting up a Context Selector widget in the HTML-5 dashboard portlet: