Export an Analyzer report through a URL
You can export an Analyzer report as a PDF, CSV, or Microsoft Excel file from a Pentaho repository through a URL. This is useful when you want to export reports from a different scheduler.
In the URL, include a path to the repository containing your report. PDF is the default output. To specify a different output type, use the format parameter and specify either CSV or EXCEL.
The following examples show how to call Analyzer from an iframe, link, or button event in a third-party web application to export a file:
Default PDF export
http://localhost:8080/pentaho/api/repos/<repository path to report with xanalyzer extension>/service/export
CSV export
http://localhost:8080/pentaho/api/repos/<repository path to report with xanalyzer extension>/service/export?format=CSV
EXCEL export
http://localhost:8080/pentaho/api/repos/<repository path to report with xanalyzer extension>/service/export?format=EXCEL
<Analyzer user>
and
<password>
before calling the URL.You can also set report parameters while exporting an Analyzer report as a PDF, CSV, or Microsoft Excel file from a Pentaho repository through a URL.
- To set a range, specify the starting point as
<parameter name>_START
and an ending point as<parameter name>_END
. For example, if your report has a YEAR parameter, the following sample URL would export an Analyzer report from 2004 to 2005 as a CSV file:http://localhost:8080/pentaho/api/repos/<repository path to report with xanalyzer extension>/service/export?YEAR_START=2004&YEAR_END=2005&format=CSV
- To set multiple values for a given parameter, repeat the parameter in the call. For
example, if your report has a TERRITORY parameter, the following sample URL would export
an Analyzer report for both NA and EMEA as
a PDF file:
http://localhost:8080/pentaho/api/repos/<repository path to report with xanalyzer extension>/service/export?TERRITORY=NA&TERRITORY=EMEA