Recent Changes - Search:

ProReports

edit SideBar

Respect my work!
If you are using commercially
ProReports please
bay a license:

or

        BTC: 

1MTFbBSKrocPK7G6GKfG8RoTw5N57WnnNa

If you have paid donate send me e-mail with Your data or transaction number to receive an access code to articles with limited access.

External schedule

Download file getREPO.class

In this case we use a feature of the ProReports, which allows you to call report the command line using program wget. This program is available on most Unix distributions. There is also a version available for Windows (attached in directory c:\<directory_of_proreports>\tools with ProReports). Below is an example of calling a report from the command line:

Important!

Please note granting permission to the report of the entered value * (star) in field Login/Role.

for the Jasper report:

wget --output-document=report.pdf "http://proreports:8080/rep/rep_jasper.php?login=NjEzYTMxM2E3YjY5M2EzMDNiNzMzYTM1M2EyMjYxNjQ2ZDY5NmUyMjNiN2Q=
&id_rep=12&outf=T&nprm[]=NamePRM&vprm[]=BM*"

for the Internal report:

wget --output-document=raport.pdf "http://proreports:8080/rep/rep_internal.php?login=NjEzYTMxM2E3YjY5M2EzMDNiNzMzYTM1M2EyMjYxNjQ2ZDY5NmUyMjNiN2Q=
&id_rep=12&outf=T&nprm[]=NamePRM&vprm[]=BM*"

If you don't have a program wget you can use java program getREPO.class, which can be downloaded from this page. Then command line look like below:

java -cp . -Dsun.net.client.defaultConnectTimeout=600000 -Dsun.net.client.defaultReadTimeout=600000 getREPO report.pdf 
"http://proreports:8080/rep/rep_internal.php?login=NjEzYTMxM2E3YjY5M2EzMDNiNzMzYTM1M2EyMjYxNjQ2ZDY5NmUyMjNiN2Q=
&id_rep=12&outf=T&nprm[]=NnamePRM&vprm[]=BM*"

where:

  • login - encrypted user login form that generates a report. If we want to determine the value, we can use field Task in internal schedule of ProReports, where value is given for the currently logged-in user.
  • id_rep – report id (column value ID in option Reports/List of reports),
  • outf – value T is necessary, if you want receive report file (saved to report.pdf – option --output-document)
  • dbres – ID of data source (served when you want to force a data source other than those specified in the report definition)
  • fext – output report format - parameter is needed if you want to get a different format than specified in the report definition, for example fext=pdf (Note! the report should support a different format)
  • nprm[] – name of parameter
  • vprm[] – value of parameter

The last two parameters can be used to repeat many times and pass parameters to the report generation. If parameters nprm[] i vprm[] will not be specified, the report is generated with a set of default parameters specified in the Datasets in definition of report. With the ability to call a report from the command line, you can prepare the shell script and run it in the schedule of the operating system.

Important!

If there is a sign of the parameter value % replace it with a string %25.


This page may have a more recent version on pmwiki.org: PmWiki:HarmZew, and a talk page: PmWiki:HarmZew-Talk.

Edit - History - Print - Recent Changes - Search
Page last modified on November 10, 2016, at 10:32 AM EST