How to use List (Component) in Ireport Jaspersoft

Posted on by By Nikhilesh, in Business Intelligence, Jaspersoft, Open Source Business Intelligence | 0

How to Use List Components in Ireport :

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

Click Here to Free Download

When dragging over a list component to one of the report’s bands, iReport will not prompt you for anything, unlike the process for the table component. You’ll have to configure it once it’s on the design area. Once the List component is in the design area, you can edit the table datasource (by right-clicking on the component).

  • In the “Connection/Datasource Expression” tab, set the drop-down to “Don’t use connection or datasource”

  • In the “Parameters” tab, add a new parameter:

    • Set the “Dataset parameter name” to REPORT_CONNECTION

    • Set its corresponding Value Expression to the parameter containing the database connection statement

Once you have that ready, you will be ready to drag fields, values or parameters for that subdataset over to the List element’s area.

Example :

Let’s start with some example to understand more perfectly :

Here my main idea is to create a report with position and salary range of each employee department.

Step1: Create an Employee Report :

1

step 2:

Here I selected some fields employee id ,hire date, full name, position title, and salary as displayed below.

2

Step 3 :

Let’s drag and drop list element into footer position of position group as below, now you can see a dataset1 automatically formed in report inspector and listcomponent as shown below.

3

Step 4:

Now let us add some queries in dataset1 with a parameter positon_id and create the same in a parameter list

like below

4

step 5:

Drag and drop the fields from the dateset1 into the list, don’t use the fields from the main dataset.

5

Step 6:

Now right click on a list(component) and click Edit list data source, a pop up will appear in use data source expression use connection expression

6

step 7:

Select the parameters tab and and map the parameter with the field in main report position id

7

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

Grab The 30 Days Free Trail

8

step 8:

Run the report to get the desired output

9

This is how we can use lists in ireport.

Thank you.

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

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