2
votes

I had generated a report using ireport Designer v5.1. For generating it i had used jrbeancollection data which is passed from java program .now i want to use this main data source as data set for ireport table.

could any one please help me to know how to do this.

thanking in advance...

1

1 Answers

1
votes

Below steps help you to show JRBeanCollection data in the Jasper report.

  1. Create the Java Bean data source using the report Data Source creation functionality which is the on top side of the iReport.
  2. You can display the data coming from the Java Bean data source, in table format.
    • List item JR table
    • Normal table structure which is created by drag and drop from the fields.

JRTable -

  1. Create subDataset from a Java Bean Data source you have created, It will return you the fields which you can use in the table.
  2. From iReport palette window drag and drop the Table. It will open the window and ask you for the dataset. Provide the dataset you have created along with other necessary information.

Normal table on report -

  1. Open main data source report query window, you will find multiple tabs
  2. Select Java bean data source tab, provide the class name or data source you have created above. You can find below the window field name and data type.
  3. The same field information you can find in the report inspector window below the Fields label in tree format.
  4. Drag and drop which field you want to display in the report in the detail band or other custom band.