Skip to content

Commit

Permalink
Update index.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGhedini committed Mar 4, 2020
1 parent 6ad07e0 commit 0015548
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions docs/components/jasper/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,35 @@ The Report Scheduler script is located under /etc/init.d/gen_jri_report.sh and c
#!/bin/bash -e
source /etc/environment
source /etc/environment
JRI_HOME="${CATALINA_HOME}/jasper_reports/"
JRI_HOME="${CATALINA_HOME}/jasper_reports/"
#source the report environment
source "${JRI_HOME}/schedules/${1}_env.sh"
#source the report environment
source "${JRI_HOME}/schedules/${1}_env.sh"
DONT_MAIL="${2}"
DONT_MAIL="${2}"
#set who is sending the mail
export EMAIL='root@localhost'
REPORT_FOLDER=$(dirname ${REP_ID})
#set who is sending the mail
export EMAIL='root@localhost'
REPORT_FOLDER=$(dirname ${REP_ID})
#encode the / in report id
REP_ID=$(echo "${REP_ID}" | sed 's/\//%2F/g')
#encode the / in report id
REP_ID=$(echo "${REP_ID}" | sed 's/\//%2F/g')
if [ "${OPT_PARAMS}" ]; then
OPT_PARAMS="&${OPT_PARAMS}"
fi
if [ "${OPT_PARAMS}" ]; then
OPT_PARAMS="&${OPT_PARAMS}"
fi
URL="http://localhost:8080/JasperReportsIntegration/report?_repName=${REP_ID}&_repFormat=${REP_FORMAT}&_dataSource=${REP_DATASOURCE}&_outFilename=${REP_FILE}${OPT_PARAMS}"
URL="http://localhost:8080/JasperReportsIntegration/report?_repName=${REP_ID}&_repFormat=${REP_FORMAT}& _dataSource=${REP_DATASOURCE}&_outFilename=${REP_FILE}${OPT_PARAMS}"
TSTAMP=$(date '+%Y%m%d_%H%M%S')
REP_FILEPATH="${JRI_HOME}/reports/${REPORT_FOLDER}/${TSTAMP}_${REP_FILE}"
wget -O"${REP_FILEPATH}" "${URL}"
if [ $? -ne 0 ]; then
rm -f "${REP_FILEPATH}"
fi
TSTAMP=$(date '+%Y%m%d_%H%M%S')
REP_FILEPATH="${JRI_HOME}/reports/${REPORT_FOLDER}/${TSTAMP}_${REP_FILE}"
wget -O"${REP_FILEPATH}" "${URL}"
if [ $? -ne 0 ]; then
rm -f "${REP_FILEPATH}"
fi
JRI Module Files
Expand Down

0 comments on commit 0015548

Please sign in to comment.