Steps for Windows:
1 - COPY jri-2.10.1-jasper-6.20.0.zip TO E:\apex_20.1
2 - UNZIP as jri-2.10.1-jasper-6.20.0.zip to jri-2.10.1-jasper-6.20.0
3 - Rename the folder jri-2.10.1-jasper-6.20.0 to JasperReportsIntegration
4 - Create a folder name jasper at E:\apex_20.1
5 - Copy the entire folder of JasperReportsIntegration to jasper FOLDER.
6 - Go to Command Prompt or CMD.exe
Go to your Apex Installation folder. e.g. apex_20.1
e:\apex_20.1>cd jasper
e:\apex_20.1\jasper>cd bin
7 - Open E:\apex_20.1\jasper\conf\application.properties
and E:\apex_20.1\JasperReportsIntegration\conf\application.properties
and ADD/MODIFY URL, PORT, USERNAME AND PASSWORD to :
url=jdbc:oracle:thin:@127.0.0.1:1521:XE
username=HR
password=HR
8 - Run this command in cmd:
setConfigDir.cmd E:\apex_20.1\JasperReportsIntegration\webapp\jri.war e:\apex_20.1\jasper
9 - Now copy the jri.war file to C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps from E:\apex_20.1\JasperReportsIntegration\webapp folder
10 - Restart Tomcat9
11 - Check the URL : http://localhost:9091/jri/
Steps of Linux :
cd /
cd /opt
cd oracle
------upload jri-2.10.1-jasper-6.20.0 to folder: oracle through winSCP
unzip jri-2.10.1-jasper-6.20.0.zip -d /opt/oracle/
mv jri-2.10.1-jasper-6.20.0 jasperintegration
unzip jri-2.10.1-jasper-6.20.0.zip -d /opt/oracle/
mv jri-2.10.1-jasper-6.20.0 jasper
chown -R oracle /opt/oracle
cd jasper
cd bin
vi /opt/oracle/jasper/conf/application.properties
vi /opt/oracle/jasperintegration/conf/application.properties
and ADD/MODIFY URL, PORT, USERNAME AND PASSWORD to :
url=jdbc:oracle:thin:@127.0.0.1:1521:XE
username=HR
password=HR
Run this command in cmd:
cd /opt/oracle/jasper
cd bin
./setConfigDir.sh /opt/oracle/jasperintegration/webapp/jri.war /opt/oracle/jasper
cp -a /opt/oracle/jasperintegration/webapp/jri.war /usr/local/tomcat/webapps/
Restart Tomcat9 :
cd /usr/local/tomcat/bin
./shutdown.sh
./startup.sh
http://localhost:9091/jri/
Implement for Oracle Apex :
Javascript (Without Parameter):
var report_server = "http://localhost:9091/jri/report?";
var report_name = "DEPARTMENT_LIST";
var report_format = "pdf";
var data_source = "default";
var run_report=""+report_server+"&_repName="+report_name+"&_repFormat="+report_format+"&_dataSource="+data_source+"";
window.open(run_report);
Javascript (With Parameter):
var report_server = "http://localhost:9091/jri/report?";
var report_name = "dept_param";
var report_format = "pdf";
var data_source = "default";
var ap_1 = $v("P3_DEPT");
var rp_1 = "&P_DEPT";
var param = ""+rp_1+"="+ap_1+"";
var report=""+report_server+"&_repName="+report_name+"&_repFormat="+report_format+"&_dataSource="+data_source+"";
var run_report = ""+report+""+param+"";
window.open(run_report);
Downloads :
Sample Jasper Report files (with and without parameter) :
https://drive.google.com/drive/folders/1qYsb9bJITbAaSVQUFvxngqiaM79sG4in?usp=sharing
Potential Youtube channel to learn Jasper Report :
https://www.youtube.com/watch?v=W3tpVJDEgo4&list=PLErD1cRL87W9P2GIviyQWJd_U2kVxleLy
Download Software :
https://drive.google.com/drive/folders/1pxzz0o0z5-Rzwca7JcBKEhjtmMKsYyMX?usp=sharing
Reference : https://www.opal-consulting.de/downloads/free_tools/JasperReportsIntegration/
Integration: https://github.com/daust/JasperReportsIntegration/releases
Sample Barcode Integration from Oracle Apex :
Dynamic Action JavaScript Code :
var report_server = $v("P197_REPORT_SERVER");
var report_name = "BARCODE1";
var report_format = "pdf";
var data_source = "default";
var ap_1 = $v("P197_COMPANY");
var rp_1 = "&P_COMPANY";
var param = ""+rp_1+"="+ap_1+"";
var report=""+report_server+"&_repName="+report_name+"&_repFormat="+report_format+"&_dataSource="+data_source+"";
var run_report = ""+report+""+param+"";
window.open(run_report);