Dynamically hiding the columns in table component in iReport

Hi folks.. here is the next stuff I worked out today.. i.e, on dynamically hiding the columns in the table component.
  • For some reports we need to display data in the format of table.. To do this in iReport we use Table Component from the palette section.
  • Sometimes to take better decision  we may not want all the fields/columns to display in the tabular data display.
  • Here are the steps to design our report with hiding columns
We work out with parameters to achieve this functionality.
We need ‘n’ number of parameters as per our requirement.
This tutorial is taking the following prerequisites.
iReport 5.1.0, Jasper Server 5.0, PostgreSQL 9.2, foodmart database.
Step 1: Creating New report
File–>New–>Name your report and save in your favorite location.
Step 2:  Creating dataset.
* From the Report Inspector , right click on report name.
* Then click on Add dataset–>Give data set name and then click on finish.
                                                –> give the connection
                                                 –> write your query(first you can write a
                                                                                            simple query, then your original one)
In our example :
       Data set name  : tableDataset
       Connection       : foodmart  (It is data source)
       Query                : SELECT distinct employee_id,full_name,first_name,position_id FROM
Step 3: Creating table using Table Component from Palette.
Remove all the unwanted bands from the design area.
* We have taken only Title band and deleted the rest.
* Drag and drop table component from the palette section and fill the columns as usually.
NOTE : Upto step 3 we do the report design normally
Step 4 :  Creating parameters
We create as many parameters required.. i.e, we have to use the number of parameters equal to the number of hiding columns.
* In our example I’m displaying 4 columns(Check step 3 Query).. and I want to hide 1 column or 2 columns or 3 columns or 4 columns…( It’s our choice to hide the columns from 1st column to last column or any random columns selection.).
* Just observe the below image
and see the below image to find the properties of parameters
(I’m showing only one parameter properties in the image , for the remaining 3 parameters we have to give like this one)
There are 4 parameters in our example for four fields in the tabular component.
1st parameter details :
Name : showEmployee_Id
Parameter Class : java.lang.Boolean
Use as a prompt : check it
Default Value Expression: new Boolean(true)
2nd, 3rd and 4th parameters details falls in the same way as above parameter.
Step 5: Using the created parameters 
We have placed the table component in in Title band ( It is not mandatory.. we can keep in  summary band also )
* We use the created parameters for the columns available with the table component.
* find the image below.
We have to write printWhenExpression for the columns as shown in the image.
* i.e, for all the columns .. we have to give conditions with suitable parametername.
* In our example I have given for all the four columns in Column Header Section like below
   Column 1 : Highlight this one and go the corresponding property.
   In the properties window give the Column Print When =new Boolean($P{showEmployee_Id})
* In this way we have to write conditions for the remaining columns with suitable parameters like above.
** By default the columns in the Detail section takes the same conditions that we have written for the columns in the ColumnHeader section.
That’s it we are done with the reporting design.
Our report should consists of some main query.. otherwise we can not see the output. It’ll just show our report is blank and the document is empty.
Preview with in the iReport
* We need to give either true or false in the text box as we are taking in the parameters as Boolean.
* Give the same for all the parameters.
* In our example I have given like this for this particular preview.
showEmployee_id : false
showFull_Name : true
showLast_Name : false
showProduct_Id : true
* So we are able to see only the true valued parameterised columns in the output.
* i.e, it looks like in the below image.
* see one more output where I’ve given fist one as true and the rest are as false.
* In this way we have made our report dynamic by hiding columns  of table component.
Preview in the server:
Upload the report to the server in a regular way.
* And create the input controls for the parameters.. parameters in iReport=inputControls in
repository of inputs
* parameter name in the iReport should be same as ID of the inputcontrol
* Crate all the 4 input controls as shown in the images.
* Remembers the Type for the input controls is Boolean
Now go to the location of the the report in the server and see the output.
* The out will looks like in the below image with the input controls specified.
OUTPUT 1: images on the selection of input controls
If we select ‘n’ number of parameters(input controls) we can see that many columns output in the table component.
Queries/Suggestions/Improving the concept in some other way is/are welcome @ [email protected]
Thanks for reading this article

Domain based report from iReport with filters

Here are the series of steps to create a domain report from jasper iReport.
In this tutorial I’m using
Jasper-server 5.0
postgreSQL(foodmart database).

Few points to note down about domains in jasper server and domainReport in iReport.


  •  Community Edition of Jasper Server and iReport do not provide the feature of domains and domain based reports.
  • Professional and Enterprise edition the Domains act as data sources.
  • They are a meta layer between the reports and the underlying data base.
  • The idea with Domains is they allow for easy joining of the data base tables and organize the resulting columns into a nice business friendly presentation.
  • Domains also allow for calculated fields.
  • The calculations are created using DomEL (domain expression language).
  • This is a simple language that allows for manipulation of fields that resolves to SQL in the underlying DB.


*  We do not create any database connection externally for developing domain based report which is a traditional way of creating database connections using JDBC and JNDI.
* Before we start developing domain based report we should create a domain in the jasper server.
* And we should connect to JasperServer from iReport.
* To know the procedure of creating domain in the jasper server plz  read the below article. http://jasper-bi-suite.blogspot.in/2013/05/creating-domain-in-jasperserver.html
* In this tutorial I have created a domain in jasperserver and named it as foodmart_domain.
* My domain consists of two tables. They are i) employee ii) store
* Fields I used for employee table are :
        first_name, last_name,gender,marital_status,hire_date,postion_title


* Fields I used for store table are : store_number,store_city,store_country
Do this first
Go to window->Click on Domains –> we can observe the window appearing just below to the Report Inspector window which is known as Domain Window.
Step 1: 
File->New->Click on Domain Report(appears at left side)->Click on BlankA4->Click on Finish.
Step 2:
We will navigate to the following window.
* Give all the details
  Connection : This is nothing but connection from iReport to JasperServer
                          ( We connect from Repository panel of iReport)
  Domain       : Select a domain which you have already created in jasper server.
                          ( In this tutorial I have already created a domain and named it as   foodmart_domain, and I’ve not shown the procedure of creating domain in this tutorial b’z we are    learning how to create a report using domain but not domain creation )
 Filters          :  Filters are nothing but input controls in the domain based report.
                          * We can select the field which we want to use as input control
                          * In this tutorial I have used two filters(input controls).
Find the images below for filters creation.
Available fields :  As we successfully connected to our foodmart_domain we can observe that the tables(of course fields also.. just double click on the folder of employee or store.. we can observe the fildes also ) available with the domain left side of the above image.
* Condition Editor : To use the filters concept we just have to
       –> highlight(click on the field) the field from Available fields panel
       –> then click on create condition
       –> Field name : When you highlight the field from available fields panel it will automatically appear here.
      –> Comparison :  give the condition from the drop down list.
       –> Value(s)      :   give some value ( Like we give in the parameter default expression in general reports)
       –> Check the is prompt ( This is used for popping up the filters)
    * In this way we can add as many filters(input controls=parameters) to the report before we design the report itself.
    * We can add the filters in the middle of the designing of the report also.
    * We can also change, delete, add/update the filters and corresponding conditions.
In our example I have given two filters. They are : i) gender ii) store_country
1st filter :
Field Name : gender
Comparison : Equals
Value(s) : M


2nd  filter :
Field Name : store_country
Comparison : Equals
Value(s) : USA
* Click on next
* Give the name for the report and location to save the report.
Step 3 :
When you click on finish you are ready to design your report….
* You can observe the tables and fields available within the domain in Domains Window
* From there you can drag and drop the fields to the details band of the design area.
* The complete design of the report you can find in the below image.
That’s it we are done with report … A domain report..
When we designing domain report , the iReport engine generates domain query language on it’s own( defaultly)
* This you can observe at Report Query Area.
* Find the image below for our example
* We have not provided any SQL query to generate the report.
* We have not added any parameters in the Report Inspector of Parameters section.
* But the iReport engine has provided the domain query and parameters from jasperserver.
* When we work with domain based Reports from iReport these all things done by iReport Engine.
How to see the preview of the report in Report Designer ?
We can directly preview the output in the designer by clicking on preview tab
You need to export this report to jasperserver and have to see the preview as follows.
* Right click on the Folder-> click on Run JasperServer Report
* You can see the output(preview) in new a new window(Report Viewer Window)
How to see the preview of the report in the JasperServer ?
upload the report to the server and see the preview.
The filter which we gave at the time of report design become input controls in the server and looks like in the following image.
Now click on Ok and see the preview.
We are done with simple domain based report from iReport.
Welcome with any queries at [email protected] or in this blog.
Thanks for reading this article 🙂

Business Intelligence in Energy Sector

Energy Efficiency :-

In today’s world, where with every passing day the need for energy is increasing exponentially, the coal and other fossil reserves depleting, energy efficiency has became a hot topic and couldn’t have been more relevant. Energy efficiency basically means using less energy to provide the same service. Energy efficiency can be done by a number of things like better usage of electronic instruments, less energy guzzling devices, more usage of solar & renewable energy resources etc.

Business Intelligence helps in collecting, measuring, collating, analyzing the data and giving actionable intelligence which can lead to energy saving. The BI solution should be such that it should be able to suffice the needs of all the business users without compromising on the flexibility or the ease of usage.

Any BI solution which is generally used in energy domain needs to help in better decision making in business areas which includes :-

a. Demand Intelligence: Reports and historical trends from historical data to be used affectively to predict energy usage, monitor energy cost, track and monitor service availaibility, downtime, monitor energy and utility demand and distribution etc. A proper BI can also help in analyzing and developing sustainable distribution models.

b. Risk Intelligence: A proper BI solution should be able to analyze predictive models and risk-reward curves to determine risks associated with energy trading.

c. Asset Intelligence: It should help in analyzing energy generation and outages leading to even better management of field employees, partners and affiliates. Monitor equipment usage and act to resolve issues in real-time. It also facilitates in tracking and monitoring equipment for preventive maintenance and replacement, track asset usage and efficiency.

d. Customer Service Intelligence: Providing dashboards to monitor and streamline call center operations, analyze call and service center response wait and times to reduce cost and increase efficiencies.

Energy Insights had in one of their survey found that BI is the number one IT investment for energy companies. Now, more and more companies in energy domain are realizing the importance of BI and the value addition it can provide. Below are the trends which is seen in BI adoption in energy sector,

1. Information Quality :-

With data being generated from thousands of different kind of devices and softwares, immense business value can be unlocked if this data is accurate. This data related issue is existent in the entire vertical of companies i.e. From exploration, production, trading, end users etc.

Information quality issue importance is being recognized by organizations since poor information quality hinders proper decision making and efficiency. Also, to achieve improved information quality, traditional data cleansing and profiling need to be supplemented with data governance, master data management, meta data management, data certification and auditability, and data protection

2. Master Data Management :-

MDM market has been growing at a rate of 14% per year. Master data has information about an organizations key business entities like customers, products, vendors etc, with the goal of ensuring semantic consistency across organizational and business process lines and simplifying process and data integration.

Energy companies need to rely on critical data from different places like partners, clients, commodities, supplier, transmission, distribution, devices etc, but unfortunaetly this critical data is managed by very disparate, redundant and often external information system. MDM should be able to address this complex, disparate, disintegrated data sources. MDM should not only take care of the technology but also the business side of the requirement.

3. Data Governance :-

Data governance is responsible for strategic direction for information quality efforts, sets standards and processes, and ensures that information quality goals are achieved.

Most of the companies still consider enterprise information management as a technology solution involving data warehouse, data migration, ETL and data visualization/presentation via BI. But an ideal solution should be encompassing IT and business needs. Even though data governance is not an easy task but its very important for a good enterprise information management.

4. Enterprise level BI :-

With more and more disparate data source, more mobile workforce and need of quicker decision making, more and more energy companies are adopting enterprise BI technologies. It should take care of all the repors, dashboads, analysis, analytics and all the requirement of the different department/ hierarchies etc. Achieving enterprise-level BI often requires significant process and organizational changes, as well as a solid enterprise-level BI strategy and architecture that address the goals and objectives of both the business and IT.

5. Enterprise level Data Transparency :-

Having a proper data transparency helps in tracking any data from its source, and understanding the evolution/changes of the same over the path. Metadata management can help in having a better data transparency. As far as energy companies are concerned, data transparency is even more important since because of innumerable regulatory, health and safety compliance’s.

6. Actionable Business Intelligence :-

Most of the companies still think that BI is used only for historical reporting and trend analysis, whereas BI is much more than that. A proper BI system in place can help in real-time operational or tactical metrics, managing and presentation of KPIs. Many companies find it difficult to provide a set of KPIs to be used and followed, and this processes has to be done right at the starting of the Business Intelligence suite implementation. Also, the operational metrics should be perfectly aligned with companies mission and vision.

A good well implemented BI can help a company in predictive analytics, optimizing investment, data driven decisions etc.

 Experience in Energy Sector :-

Helical IT Solution has got immense expertise in energy sector. The work done includes

– Data loading, data integration, data aggregation, data cleansing, data validation, data standardization and data integrity from different sources/devices/meters

– Google maps and google earth integration – To show devices consumption from different meters with hover information, heat maps, selection parameters, toggle switches etc

– Different interactive, parametrized reports (both operational and transactional reports) with drill down and drill through capabilities like Kwh usage report, annual usage report, Total Harmonic Distortion Voltage by feeder, THD by feeder, Waveform current, waveform voltage, Substation report, VAR mgmt report, VA reactance report, monthly meter report, historical monitoring report, meter health availability percentage report,

– Drill down/drill through dashboards with interactivity like annual summary usage dashboard,

– Mobile compatible reports and dashboards which can be even hosted on cloud, security implemented with userid

– Setting triggers/alerts for any specific action like data not coming, crossing of a threshold etc

– Email automation so that reports/dashboards can be automatically mailed to stakeholders in specified format (doc, xls, odt, pdf, html etc)

– Creation of real time reports and dashboard like realtime transformer monitoring report

– Creation of data warehouse and data mart

– Adhoc reports so that end users can himself drag & drop and create his own reports, visualize it using different charts, download, mail

– OLAP view for ability to drill down in data at any level to have the root cause analysis

– What if analysis

– Analytics to predict future usage, downtime etc

– Solution integration with your existing software/website/portlet/application

– Single window view on Liferay portlet showing many windows like reports, dashboards, analytics, google maps, weather information, calendar etc

There is much more functionality which can be put be it in terms of reports, dashboards, data visualization, analysis and analytics, integration, interactivity etc.

Please get in touch with me at [email protected] to know more about our work, demo, business collaboration and opportunities

Helical IT Solutions Raises Funding

Hyderabad, May 6, 2013: Of the many IT start-up success stories there is a new one on the block to watch out for. Helical IT Solutions, a Hyderabad based technology company providing services in open source data warehousing and business intelligence services has bagged a seed funding of INR 2.5 million from Singapore based Citibank official within 6 months of starting operations.

The company which started in November 2012 from Hyderabad has catered to technology needs of clients in various domains including e-commerce, insurance, energy, social media analytics, healthcare and human resource while building and managing their Business Intelligence platforms.

The eight member strong team is quite excited with the fund inflow and plans to use it primarily for recruitment and partnering with leading BI vendors in the open source space such as Jaspersoft and Pentaho. They want to focus and build up their capability of providing sector specific BI offering with this fund.

Specializing in Open source technologies, Helical has proved to be a great bet for its clients cutting down on their costs and adding to their efficiency and turnover. Their services include Business Intelligence, ETL, Data warehousing and data modelling, data visualization to name a few.

About Helical IT Solutions :
Helical IT Solutions is an open source Data warehousing and Business Intelligence company based out of Hyderabad. The company works primarily on Jaspersoft and Pentaho BI suite and on talend, on Talend and Kettle. Other services provided are data visualization, data modelling, data warehousing etc.

Contact Person :
Nikhilesh Tiwari
Cell : +91-7893947676
Email : [email protected]

The companies funding news has been covered y many leading India based websites












Giving Hyperlink to text field.. Row banding implementation in Jasper iReport

Sometimes simple things might take lots of time….

Here is the tutorial …..
I’m using the following versions : iReport-Pro .5.0, Japserserver CE, Database : foodmart database in postgre SQL.
I’m using two reports
i) hyperlink
I’m gonna show how we can give hyperlink in one report and how we will navigate to another report.
And How to give row banding in iReport?

In Report 1:
Step 1: Connect to database (Click on database icon and give all the details and test it )
Step 2: delete all the not needed bands(If we don’t delete it leads to page gaps in the output)
Step 3: Write a simple query in Report Query area ( Just right click on report name in the
Report Inspector then Select the query)
I’ve given like this : select 1 as One
Step 4: The bands I’m interested to take are : Column header and Detail bands respectively.
Step 5: Drag and drop the field to detail area And drag and drop a text field from palette to
column header.
The below image gives somehow idea.

Hyperlink to text field and Rowbanding for fields

Step 6: Giving Hyperlink to text field
i) Write text in double quotes like : “Hyper link”.( Text field should take double quotes whereas static text field doesn’t take double quotes and doesn’t applicable to create hyperlink)
ii) Right Click on the text field ->Click on Hyperlink-> It opens a window
see the sample in the following image


iii) Give Hyperlink target as : Blank
Hyperlink type as : ReportExecution
iv) Click on Link Parameters.. Give  Link parameter name as : _report
Parameter Class Name as : java.lang.String
Value Expression : location/Path of the second report in the server
for example the path is : “/reports/Demos_Sadakar/HyperLinkDemo/Hyperlink_Report2”
We can observe the location in the below image


NOTE : Remember that Hyperlink_Report2 in the URL is the ID of the jasperReport when we give at the time uploading report to server.. i.e, it is not the name of the Report.


Step 7: Now save the report and upload to the server(Hope we know how to upload a report to server. Please find how to upload a report to server in the list of posts of my blog)

In Report 2:( A normal report with row banding functionality)
Step 1: Create a report and write query in query area
(Give same database details.. foodmart details)
I have taken this query : select * from employee
Step 2: Just drag and drop fields from Fields node of Report Insepector to Detail band.
( dragging only few fields)
Step 3: Now we are working on row banding.
i) Go to Report Inspector panel
ii) Right click on  Style option and Add some style.. I’ve given default name as style1
iii)Right click on style1 and select Add Conditional Style
iv) Now double click on it and i’ll open Expression Editor.. there we need to give the follwoing condition
new Boolean($V{REPORT_COUNT}.intValue() % 2 == 0)
In the above expression $V{REPORT_COUNT} is the default variable provided by jasperians in iReport. Check variables in the Report Insepctor.


v) Go to the properties of Conditional Style expression it opens it’s poperties( not click on Style1.. click on the conditional thing). In the properties window select give your favourite BackColor.
I’m showing the scenario in an image.


NOTE: do not check Opaque check box. just leave it.

Step 4:  Now select the fields you want to apply for the fields. I’ve selected all the fields that I’ve dragged to the Detail band. You can observe the multiple Objects properties window on the right side.
From the properties go to style and give the style1( just click on it it’ll show all the created styles.. In our example we have created only one style i.e, style1)


That’s it. Now save the report and see the output of the report in the server . It’d look like the following


Execution of the Reports using hyperlink- Final Output.
NOTE : When we create an hyperlink and if it works fine then the color of the text changed to light blue and it’ll have underscore on mouseover.

First Report Output:


 Now click on “Hyper Link” that we are seeing on..

It’ll redirect to another page which we call it as hyperlink functionality in iReport.


🙂 🙂
Thanks for your time to read this tutorial 🙂 🙂 🙂
for any queries :  [email protected]