Jasper Reports - Basics

Following is the summary of steps to use Jasper reports:

*. Download and Install Jasper Studio 6.16 from https://community.jaspersoft.com/project/jaspersoft-studio/releases


*. You will first add the Oracle driver for JDBC which can be downloaded from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html and add to the classpath.

*. Then you will create a new data source in Jasper Studio using the schema credentials we sent in the Welcome email.

*. Create your new report with Jasper Studio and save it on your computer.

*. Upload the .jasper file to the Jasper FTP folder using the credentials provided in our Welcome email.

*. Call Jasper to report from your application with APIs as shown below:


begin
  xlib_jasperreports.set_report_url('http://jasper.maxapex.net:8090/JasperReportsIntegration/report');
  xlib_jasperreports.show_report (p_rep_name => :p5_rep_name,
                                  p_rep_format => :p5_rep_format,
                                  p_data_source => :p5_data_source,
                                  p_out_filename => :p5_out_filename,
                                  p_rep_locale => :p5_rep_locale,
                                  p_rep_encoding => :p5_rep_encoding,
                                  p_additional_params => :p5_additional_params);

  -- stop rendering the current APEX page 
  apex_application.g_unrecoverable_error := true;
end;


Here is a description of the input parameters:

 

parameter description default value required?
p_rep_name specifies the report name test
*
p_rep_format the report format, e.g. pdf, html, html2, rtf, xls, jxl, csv, xlsx, pptx or docx pdf
*
p_data_source configured data source, e.g. default, test default
*
p_out_filename a filename can be specified for the download for the "save as" dialog  
 
p_rep_locale

Locale string, composed of the 
ISO language code and 
ISO country code

de_DE
 
p_rep_encoding

the "charset" parameter for the content_type, a list of valid entries can be found here
E.g.: ISO-8859-15, UTF-8, Windows-1252

UTF-8
 
p_additional_parameters all parameters are passed directly to the report (excluding the internal ones (prefixed with "_")    
     
  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

PDF Reports / Jasper / Oracle REST Data Service Print Engine ( FOP ) / BI Publisher

Oracle REST Data Service Print Engine   You can generate PDF reports using Oracle REST Data...

Jasper Studio Download

Our server is running Jasper Reports Library version 6.16 therefore make sure you use Jasper...

Jasper - Error: Datasource not found

If you have signed up within last 24 hours and getting Error: Datasource not found when running...

Display Image/BLOB in Jasper Reports

Please change the type of the BLOB field to java.awt.Image and make sure you are using Image...

Video Tutorials - Jasper

Add Oracle Driver to ClassPath Create Database Connection Creating a basic Report...