Jasper Server and studio complete
installation step by step
Step -1
Download
1. jaspersoft studio
2. jasperserver
from official TIBCO website
Step-2
Install jaspersoft studio
Install jasperserver
Step 3
Jasper Report Integration
First Check your System Environment Variable (For Windows same as linux)
Right clock on: This PC/My Computer icon
->Properties
->Advance System
->Advance
->Environment Variable
->System Variable
->select Path
->edit
->new
->C:\Windows\SysWOW64
->move up under C:\Windows\System32 position
->apply ok
->ok
Install JDK latest version (if not installed)
again add jre path to environment variable
Right clock on: This PC/My Computer icon
->Properties
->Advance System
->Advance
->Environment Variable
->System Variable
->select Path
->edit
->new
->C:\Program Files\Java\jdk1.8.0_202
->apply ok
->ok
Create the required directory structure
First you need to set up the required directory structure in the target directory.
Just copy the directories conf, reports and logs to the target directory,
e.g. c:\app\JasperReportsIntegration:
then
open cmd terminal & execute following
SET OC_JASPER_CONFIG_HOME=c:\app\JasperReportsIntegration
now set jasper report directory
first go to your download path (in my case D:\All Soft\Oracle\Jasper Report\Jasper Integration URL\jri\jri-2.7.1-jasper-6.16.0)
open a cmd terminal here
cd bin
setConfigDir.cmd ..\webapp\jri.war c:\app\JasperReportsIntegration
process web.xml
replace config.home with directory: c:\app\JasperReportsIntegration (confirmation)
close the cmd terminal
& go to this path jri folder (in my case D:\All Soft\Oracle\Jasper Report\Jasper Integration URL\jri\jri-2.7.1-jasper-6.16.0\webapp)
then
copy jri.war file from here
then
Rigth click on my computer tab
select manage
then service
then
Stop tomcat server service.
then
paste the jri.war file in (in my case C:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat\webapps) here.
again
Rigth click on my computer tab
select manage
then service
then
Start tomcat server service.
if tomcat server login username password problem
then got to this path (in my case C:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat\webapps\manager\META-INF )
(Solution-1)
Then edit context.xml
I commented the Valve tag completely (/tomcat/webapps/manager/META-INF). So my context.xml looked like below
<Context antiResourceLocking="false" privileged="true" >
<!--
Remove the comment markers from around the Valve below to limit access to
the manager application to clients connecting from localhost
-->
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFil$
</Context>
(Solution-2)
go to this path (C:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat\conf)
add the following line in tomcat-users.xml
in tomcat-users.xml (/tomcat/conf/)i did
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-status"/>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="admin-script,admin-gui,manager-script,manager-gui,manager-status" />
then run
http://localhost:8082/ for tomcat admi panel
then click on manager app tab
provide uN:admin pw:admin then hit enter
then
run
http://localhost:8081/jri/
for jasper report integration
Then goto this path (C:\app\JasperReportsIntegration\conf)
then add new datasource for jasper report integration
via
edit application.properties
add
[datasource:dms]
type=jdbc
name=dms
url=jdbc:oracle:thin:@127.0.0.1:1521:XE
username=dms
password=dms
the save the file and restart tomcat server
again
Rigth click on my computer tab
select manage
then service
then
Stop tomcat server service.
Start tomcat server service.
then
go to this path (D:\All Soft\Oracle\Jasper Report\Jasper Integration URL\jri\jri-2.7.1-jasper-6.16.0\sql)
open cmd terminal
sqlplus /nolog
conn sys as sysdba
use cmd @sys_install.sql
provide your schema name
in my case i put dms
after complete the above cmd then
conn dms/dms
use cmd: @user_install.sql
exit the cmd terminal
now go to your jasper server login page and login with default
URL: http://localhost:8081/jasperserver-pro
UN: jasperadmin
PW: jasperadmin
now click on create
then data source
use jdbc
then provide your hostname/ipaddress as shown in screenshot
Now go to jasper studio and click on new
Then jasper report project
Then add new data adapter
Then create a new jasper report using that data connection
Then modify design layout as your requirement
Then create on right side parameter tab
Add new parameter and Then add parameter to your sql code
After that check parameter using data
Then click on compile report
Then goto report generated path
And copy the report name for future use
Then click on jasper report publish tab
now create a apex page with
a button
a page item
and a button
using dynamic action as
javascript code for report testing
=====code with parameter ===============================
var report_server = 'http://localhost:8081/jasperserver-pro/rest_v2/reports/reports/DMS/PERS_INFO_A4_Landscape.docx?PARA_GENDER='+apex. item("P20_GENDER" ).getValue()+'&j_username=jasperadmin&j_password=jasperadmin';
var report_name = "PERS_INFO_A4_Landscape";
var report_format = "docx";
var data_source = "dms";
var run_report = ""+report_server+"&_repName"+report_name+"&_repFormat="+report_format+"&_dataSource"+data_source+"";
window.open (run_report);
everything set now just hit the print button and see the magic…..
Hello,
ReplyDeleteMany thanks for the helpful post. May i request you to share the Jasper Reports Server community edition ? If you have, i will be great-full to get it. Thanks in advance.