How to Dynamically Change the Column Headers Based on Locale

Posted on by By admin, in Jaspersoft | 0

Step1: Create a table with locale, first_name, last_name, email, phone_number and salary in foodmart database and insert values into that table with different languages.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Click Here to Free Download


Step2: Create a sample report with foodmart database and use the below query in main dataset.

Select * from Internationalizing where locale= 'en'
Step3: Drag and drop text fields in column header band, add those fields in text fields.
Step4: Drag and drop table component from the palette tab in summary band.
Step5: remove column headers for table and adjust field values for above text fields in column header.
Step6: Create a parameter and give an expression as

You should invisible the parameter in jasper server.

Step7: In the main dataset query pass that parameter in where condition.

Select * from Internationalizing where locale= $P{Locale}

Step8: Deploy the report in jasper server.
Step9: Login with jasper credentials and select appropriate locale.

In case if you have any queries please get us at support@helicaltech.com

Thank You
Purneswara Rao
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments