iReport is an reporting tool used for designing jasper report in OpenERP. In OpenERP it is difficult to create a report that has a dynamic column. For instance consider an example of a project report that has details regarding the project task completion date. The task name will be the name of the column. In such cases, the cross tab in report comes handy.
Crosstab can be found in Palette in iReport. It can be dragged and dropped in to the report as needed. Initially create a report. Drag the crosstab from pelette and drop it in the report. A wizard for the crosstab creation pops out. First we have ro select the datasource for the crosstab. I am using my main report data source for my crosstab.
Select your datasource and click next.
Next we have to select the row group. Row group defines the rows for grouping. In this case since the report deals with task for each project. Hence i am defining the row group as project which is the name of the project.
Next we have to select the column group. Column group corresponds to the name of the column. In this case the task name is the name of the dynamically varying column. So i am defining the column group as task which is the task name.
Next we have to select what detail of the task that correspond to each project has to be displayed. In my report i am giving the start date of the project.
Next we have to select the layout of the crosstab. We can add row group, column group or guidelines based on the requirement. Now the crosstab appears in the main report. If we want to add some row group or column group, go to report inspector in iReport, Expand the crosstab right click on row group or column group and click Add row group or Add column group as we need.
Cross tab is a useful tool in iReport and can be modified as our requirement. The project report will be generated as:
Prajul P T: Hi, For your first query, ie; the overlapping of subreports , first select the subreport from main report go to properties, there you can see a field "Position Type". Set it to "Float" so that the subreport will not overlap. For Your second query, if the data in a crosstab is null it will be shown as null in the report. Please check weather you are retriving the data correctly. For example: In the above report the the column group is the partner name and the measure is the phone. if there is no phone number for a partner, it will be shown as null. Please check you are retriving the data correctly. Hope this helps... ".
Leave a Reply