From 1a0becdb3e256616be9580f87a062a3b42d78008 Mon Sep 17 00:00:00 2001 From: David Ghedini Date: Fri, 7 Apr 2023 00:43:00 +0300 Subject: [PATCH] Update reports.rst --- docs/resources/reports.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/resources/reports.rst b/docs/resources/reports.rst index 95432e7..428aa50 100644 --- a/docs/resources/reports.rst +++ b/docs/resources/reports.rst @@ -50,8 +50,7 @@ The code then parses the _reportName parameter to create the url. $data = array( "_repName"=> $_GET['report_name'], "_repFormat"=>"pdf", - "_dataSource"=>"datasource", - "_outFilename"=>"report.pdf" + "_dataSource"=>"datasource" ); $file = 'http://123.4.5.6:8080/JasperReportsIntegration/report?' . http_build_query($data); @@ -62,7 +61,7 @@ The code then parses the _reportName parameter to create the url. header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); - header('Content-Disposition: attachment; filename="'. $data['_outFilename'] . '"'); + header('Content-Disposition: attachment; filename="'. $data['_repName']. ".pdf" . '"'); header("Content-Transfer-Encoding: binary\n"); readfile($file); @@ -72,7 +71,11 @@ The code then parses the _reportName parameter to create the url. - + + + + + Report Form