Planet Jaspersoft

May 6, 2016


Individual months Calendar View Visualization example using CVC component.

 1990 Data :(Please click on image to get the best view)

1991 Data :(Please click on image to get the best view)
Development Credits : Sadakar

Coming together is a beginning; keeping together is progress; working together is success. 

:-) knowledge transfer made me to develop this visualization :-)  

May 6, 2016


Calendar View Visualization example in Jasper 6.2 CE/Pro Studio

(Please click on image for best view) 

(2008 -2010 data)

 (1990-1993 data)

Control report parameters using some cascading or some logic in default value expressions. 
If not it will generate empty blocks for the years. 

Coming together is a beginning; keeping together is progress; working together is success. 

Yes, we did it using CVC component.

Special thanks to my senior & fellow buddy for continuous encouragement and guidance.

Credits : Sadakar & Abhi. 

- Sadakar Pochampalli

May 6, 2016

May 1, 2016

In this post you will see how to work with a basic oracle stored procedure.

Software Setup : 
1) Oracle SQL developer  Version
2) Japsersoft Design Studio 6.1 Professional
3) Jasperserver 6.2 professional 
4) Oracle Version : Express Edition

Aim of the report : Display employee data as a grid 

1) Connecting to XE schema in database client tool ( i.e., Oracle SQL developer)

NOTE :  Default username and password while installing Oracle Expression

conn sadakar/sadakar
Syntax : conn schemaName/Password

2) Writing Stored Procedure on "emp" table ("emp" table comes with oracle 11g installation). 

create or replace procedure "REF_CURSOR_SAMPLE"
(emp_cursor  IN OUT SYS_REFCURSOR)
  open emp_cursor for
    select * from emp;
end ref_cursor_sample;

Execute Stored Procedure in Oracle SQL developer:
NOTE : Make sure set serveroutput on (i.e., run this command in SQL developer before trying to print the SP result set)



PRINT :emp_data;

3) Create a simple JRXML and in the Query editor change the language type to "plsql" and call the above stored procedure as follows 

Syntax : { call procedureName(param1,param2,$P{ORACLE_REF_CURSOR})}

 4) Create a parameter called "ORACLE_REF_CURSOR" in parameters Outline section and write its type as java.sql.ResultSet

5) In the query editor manually type the field names and provide types to them as shown in below image

NOTE : If you click on "Read fields" button you may see or stop with below error message
net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query:


Caused by: java.sql.SQLException: Invalid column type: 2000 

 6) Design the report and save then preview it. 

7) Japsersoft Design studio preview  of the report. 

Report output in Jasper server:

Configure PL/SQL for Japserserver (5.5 or later)
It can be found at

After successful configuration publish the report to the server and check the output.

NOTE : Create oracle "XE" data source connection before publishing the report.  Sample connection is shown in below image. 

Download : 
Sample JRXML : click me.!

References : 

Learn more about SP's here :

May 1, 2016

April 19, 2016

Hi ,

This post is a re-blogging on how to get data in a pop-up like tool tip when clicking on a text field or image field or a graph slice or bar.

Here is the actual reference for the example :

Example Environment : 
TIBCOJapsersoft Design Studio Professional 6.1
Japser Server 6.2 Professional
PostgreSQL database.

Example explained in below PPT - Visit download section in this page.

Sample Screenshots : 

Image-1 : Sample Code to come in PopUp:
(Please click on images for best view of content available on it)

 Image-2 : Sample output : Perform click action on customer_id=6 field as shown below
(Please click on images for best view of content available on it)
 Image-3 : Sample output : Perform click action on customer_id=2 field as shown below
(Please click on images for best view of content available on it)

Download :
1) Presentation 
3) Report zip extract from Server
4) Original source code
5) source js file.

Click me to download 

Direct link :

I hope this re-blog helps someone in the community..!

Sadakar Pochampalli 

April 19, 2016

April 14, 2016


This post will talk about how to create topics from Japsersoft Design Studio.

Software used for this example : 
1) Jaspersoft Design Studio 6.2 Professional
2) Japsersoft 6.2 Professional Server
3) Foodmart database - PostgreSQL database server

Few Questions : 
1) What are topics ? What is the usage ?
2) What are the types of topics ? When to go for which type ?
3) What is the difference between regular report or studio based topic ?

Jaspersoft offical documentation references : 
1) Creating Topics :
2) Topics - Domains :
3) Jaspersoft Domains & topics references

 Basic understanding of  Studio based topics : 

Example : Step by Step Procedure : 
1) File -> New -> JapserReport -> FoodmartTopic.jrxml
2)  SQL 

 3) Points to note down 
#) This is a parameterised JRXML which will be populated while creating the Ad-Hoc view
#) i.e., pre-filter the data at SQL level and the same will be asked while creating ad hoc view.
#) Parameter Name : param_Gender and type is : java.lang.String
#) Need not to design anything here in JRXML but you can use $R{} report object to localize.

4) Changing Label names in JRXML level for Studio based topics
#) In above image, you can observe the field names are like "state" , "occupation"  and etc.
#) You can change "state" as "Store State" as label name. 
#) For doing this you need to add "adhoc.display" property in the JRXML
#) Example : change state to "Store State"

    <field name="state" class="java.lang.String">
     <property name="adhoc.display" value="Store State"/>

#) remove / for > in first line , and write end tag for it </field> , in between write the property. 

5) Save the JRXML and now its time to send/publish it the server. 

6)  Uploading JRXML as JasperReport (This will become Topic when creating ad-hoc view)
Name of the Report/Topic : FoodMartTopic 

I am taking "Topics" folder available in under /public/adhoc/topics for keeping/publishing the JRXML created.
 If it is organize specific you may see Topics folder under /organizations/organization_1/adhoc/topics

What I observed, when I keep it in some other folder it is not populating as ad-hoc view when we create. 

Step-1 : As shown in below figure, navigate to JasperReport from Public -> Topics -> Add Resource -> Jasper Report

Step-2 : Browse for the JRXML as shown below image

Step-3 : Edit the Data source
 Step-4: Add the input control (param_Gender)
NOTE: We are taking a filtered JRXML for topic and it should be available while creating the view.

 Thats all, we are done with uploading JRXML that will become as "Topic".

Now, its time to create "Ad Hoc View" then "Ad Hoc report" on top of it.

7) Creating Ad Hoc View and Ad Hoc Report
Step-1: From Jasperserver menu bar click on "Create" -> "Ad Hoc View"
Step-2 : Select the "FoodmartTopic" as shown in below image. 
Step-3: When we click on "OK" it will open Ad Hoc editor with "Input Controls" window popup. 
#) By default it will display "NULL" in input control as we set the type as "Static Text" while creating input control for the topic. You can change it to "Single Select" query or to other types.
#) Type "F" value in filter as shown in below image then click on "OK" button.

(Click on Image to get the best view of content in it)

Step-4 : Select the type of Ad hoc view ( Lets take cross tab type) and drag and drop the "Dimensions" and "Measures" of your choice. 
A sample is shown in below image. 

(Click on Image to get the best view of content in it)

Step-5: Save this ad Hoc view as View as well as Report. 

Step-6 : Running the Report created 

Observe the view & Report ( I took same folder to keep both)
Now, running the report (Select the report and click on "Run" button).

This way one can work with Studio based topics for Ad Hoc views and Ad Hoc Reports. 

Download Examples and Setup : 
2) Server Project Zip file (There are other examples in zip - Go with the images that you see in this post)
3) Deployment procedure : Import the zip file in Professional or Enterprise Server and point out to foodmart database to Topic, View and Report.

Click Me to Download

#) View is like Report. Don't get confuse with the Type because uploading a normal JRXML as a report will have same type . i.e., "Report" 

I hope this will help someone in the community. If you find it useful, please hit on google share button and help the other. 

Thank you for visiting this page. 

Until Next..
Sadakar Pochampalli 

April 14, 2016

April 12, 2016

Example-1 :  Tilford Tree (2 level)

Example-2 : 

Example-3 : 

Example-4: (Collapsible Tree- 2 level)

Example development Credits: Abhi :-)

April 12, 2016

April 7, 2016

This post will help you in understanding how to identify the ID for the filter that is being created in Ad Hoc view and then in Ad Hoc Report.

Software used for this example/discussion is : Japsersoft Server Professional 6.2

Please click on the images that you find in this post for getting the best view

Some points :
1) We create Fields as filters in Ad Hoc Views (or in Ad Hoc views).
2) We can't identify the ID's for the filters in Ad Hoc Reports.
3) Usually we Edit the Report to view the Data Sources,Controls & Resources and etc.
4) When you click on Controls & Resources for the Ad Hoc views you can not find the filters over there because its not a studio report.
5) To identify the filter/parameter ID, we have to go and look into the Domain and have to see the ID there for the field (which we used as filter/parameter)
6) As we use the field twice in View it doesn't take the ID we found in Domain.
7) As of Jasper 6.2, it takes "field_id_identified_in_domain"_1, 
for example : 
sales_stage_1 where sales_stage is the ID identified in domain for "Sales Stage" label/field.

Lets understand the above points using screenshots. 
1) Domain used for this example (Simple Domain) - Available in Pro server
2) Sample View (Filter is : A.Sales Stage ) 
* "Sales Stage" is the label name for "sales_stage" field from "Simple Domain"

3) Writing Ad Hoc Report using above view and the filter used is "Sales Stage" field

4) Now, if you try "Edit" ing the report you can't find the filter available from Studio as well from Server. 

5) Identifying the  ID for the "Sales Stage" filter from domain ("Simple Domain" is the domain name
ID for "Sales Stage" filed from the domain is : sales_stage

6) After identifying the filter use this ID along with _1 (underscore 1) post fixed to it
Field ID = sales_stage 
(This is the original field name from database table while writing the domain, you can change it also by clicking on edit button)
Filter ID = sales_stage_1  (As "Sales Stage" label or you can say "sales_stage" filed is being used twice in view, you have to take underscore with 1 )

This is what I identified while exploring passing the ID for a report developed developed using Ad Hoc Views

NOTE: Reader is encouraged to add if he/she find any other alternative way in comments box.

7) Now use this ID (sales_stage_1) in URL 

For example 1: 

Example-2 : 

I hope this helps some one. !

If you find it useful, please hit the share button help the community.!

Sadakar Pochampalli 

April 7, 2016

April 5, 2016


This post will teach you how to work with TOC report using Report books and best practices in Jasper Design Studio 6.2 Professional or later.

1) Report books is a new feature for TOC implementation in Japser Reports from 6.0 version.
2) Its always a best practice to write Report book JRXMLs in a separate project.
3) Saving report book doesn't support saving it in a folder in project.
4) All you need to know how to map exact data sources in Main Report book and content JRXML.
5) In addition to point-1 , need to know how to pass parameters correctly.
6) Understanding how book marks works on Text elements is required to work with Report books.

Questions : 
1) What is the difference between sub reports & Report books ?
2) What is the difference between drill down reports/ hyperlinks and book marks ?
3) Is it possible to get the TOC in word export as you see in PDF ? If yes, how ?

Report Books :
Jaspersoft Official documentation page :

Here you go with an example,

Display State Table of contents for Customer Details Tabular Report 

1) Creating Project 
a) Click File->New -> Project -> JasperReprots Project -> Give name to the project (Lets say "ReportBooks_TOC_Example"

2) Creating Report Book
a)  Click on File->New -> JasperReport -> Report Books -> Select "Abstract Book" as shown in below image.

 3) Choosing Data source for Report book and writing Query. 

As shown in below images select foodmart data source and then write a sample query . Click on Next to get Report Book parts selection.

Report books contains 3 sections
They are
1) Front cover
2) Content
3) Back Cover
Select all of them and click on "Finish" button.

4) Observations
a) Generated JRXMLs in Project folder
b) Canvas of Report Book

a) Generated JRXML's in Project folder
Once you click on Finish button, the studio engine will generate below JRXMLs in project folder.

b) Canvas of Report Book - Canvas of report book looks as below. 

5) Lets have a quick look into the report book output and observe few more things. 
a) Click on Preview button (It will generate .jasper files for .jrxml files - you can do it by compiling too).
b) The default Preview should generate 3 tabs as shown in below image.
c) When you click on "TocReport" tab you will not find any thing, you need to change/remove the default styles on all the text fields. 

In the TOC JRXML make sure the content is dis-styled to get the labels view-able
  Understanding TOC JRXML
1) It is not required to connect to any data source in this JRXML
2) Don't change any field lables in it. The lables are pre-built for generating TOC.
3) You can change the styles for the lables.
4) You can not keep two labels in single Detail band.

6) Lets understand few more things in ReportBook JRXML

a) Report book out line is divided into 3 parats,
b) In each part, you will either keep .jasper or .jrxml files.
c) This outline section has the other general reporting elements as shown in below image.
d) Properties of the Report book is same as general report.
c) Each Report book part has its own properties as shown in below.

Cover page part properties.  - Notice that the evaluation time for this part is "Default"
Similarly the back cover has "Default" evaluation time as shown in below image. 

Toc Page part Properties - IMP : The evaluation time for TOC page is "Report"
7) Now create a content JRXML in the same project folder ( Tabular Report with State wise grouped example for content). 
Lets say the report name is : ContentReport.jrxml
Data source connection & Query :

Report Sample output(making sure that report working fine individually)

8) Giving Book Marks to the "state_province" text field to get the states in TOC jrxml 

a) Select the "$F{state_province}" text field and in its hyperlink give
Anchor Name Expression = $F{state_province}
Bookmark level=1 
(NOTE : By default TOC jrxml has 3 levels in which 1st level will be given to "$F{state_province}" text field. )

9) Now , Add this ContentReport.jrxml  to the ReportBook.jrxml

a) Right click on the content canvas  and then click on "Add book part"

b)  Select the ContentReport.jasper or ContentReport.jrxml and Report Connection as shown in below

Observation : Make sure that "Connection Expression" is set 

10) Save the report, Compile and Run. 

Sample output : (Shown TOC part) - Download the PDF output to view the TOC functionality. 

 Navigation output sample to Mexico grouped data or to 262nd page.

This way you can work with TOC -Report books in Jasper Design Studio.

Publishing TOC Report to Jasper Server and viewing the output
a) Click on Publish button and choose the folder of your choice 

 b) Observe the JRXMLs as resources to the Main Report book JRXML(not visible)
 c) Configure the data source.
 d) Successful of resources.
e) Viewing output in Jasper server

Observe the book mark popup and tabs for Report book sections. 

TOCReport Sample

 Performing click Action on "OR" state to drill down to the OR state grouped by data.

Download : All the examples works only on Professional or Enterprise Jasper 6.2
1) Studio Example Project Zip File
2) PDF Export output file
3) Jasper Server Export output.

Click Me to download 

Or Direct Link :

I hope this helps someone getting started with it.

If you find it useful, please click on share button and help the community.

Thank you for visiting this page.

With Best Regards,
Sadakar Pochampalli 

April 5, 2016


This tutorial will help you to understand how to Map parameters from view type dash lets in Dashboard designer in Jasperserver 6.2.

Lets take "Simple Domain" available in Jasper Professional or Enterprise edition and create two views as shown in below images.

View-1 : with "Sales Stage" parameter/filter

(Click on image to get the best view)

View-2 : with "Sales Stage" and "Title" parameter

 Creating Dashboard with Views. 
1) Click on Create --> Dashboard
2) From the exiting content drag and drop the views (Ad hoc view , Ad hoc view 2)
3) Your dashboard design should looks as follows. 
4)  Parameters Mapping & Grouping
Mapping for : Pass parameters from View-1 to View-2
* View-1 has "Sales Stage" filter and View-2 has "Sales Stage" and "Title" filter.
* Out of these parameters "Sales Stage" is common for both the views.
* Observe in View-1 "Title" is the category field (X-Axis). When you perform click action on this   category the category name value should be passed to View-2 and it should be caught by "Title" filter/parameter in it(View-2).
* This can be done by right clicking on the dashlet-1 and setting the hyperlink as shown in below image 

* Please see the top section  in below image(Parameter Mapping Image) for  - how the filters are mapped.

Grouping for : Making dashboard dynamic with dash let parameters - Common & non-common parameters assigning to the dash lets.
It can also available in Parameter grouping section as well in filter button on top of the dashboard

(Click on image for best view of the content )

 Now, save the dashboard and Run it. 

While performing click action on a category: 
 (Click on image to get the best view)

After performing click action see the change in right side dash let : 

This way one can achieve inter dash lets communication in new jasper 6.2 server.

Download Example : Works only on Professional and Enterprise Servers  on food mart database. 

Click Me. 

Domains download for the example used : Click Me

I hope it helps someone for quick understanding.

If you find it useful, click on share button and help the community.

Some points :
1) Is it possible 

Until Next ..
Sadakar Pochampalli 

April 5, 2016

April 4, 2016

Even though the recent version of Jaspersoft Studio Community Edition has a JDBC Driver selection for Redshift, the connection doesnot work as the Driver is a Tibco driver and is available only in full version. So there should be a way to connect to Redshift Cluster using Jaspersoft studio’s community version, and I started to […]

April 4, 2016