jasper reports - How to make grouping in JasperReports? -


i generating pdf jasperreports xml data source.

i have table enter image description here

and xml below:

<multiplerecord type="paf_details">     <record pafno="paf121" mincomm="5" invoiceno="bill000000121" type="exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf122" mincomm="5" invoiceno="bill000000122" type="exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf123" mincomm="5" invoiceno="bill000000123" type="exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf124" mincomm="5" invoiceno="bill000000124" type="exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf125" mincomm="5" invoiceno="bill000000125" type="exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf124" mincomm="5" invoiceno="bill000000124" type="exclusive" category="category i" slabno="slab 2"/>     <record pafno="paf122" mincomm="5" invoiceno="bill000000122" type="exclusive" category="category i" slabno="slab 2"/>     <record pafno="paf123" mincomm="5" invoiceno="bill000000123" type="exclusive" category="category i" slabno="slab 2"/>     <record pafno="paf126" mincomm="5" invoiceno="bill000000126" type="non - exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf127" mincomm="5" invoiceno="bill000000127" type="non - exclusive" category="category i" slabno="slab 1"/>     <record pafno="paf128" mincomm="5" invoiceno="bill000000128" type="non - exclusive" category="category i" slabno="slab 1"/>   </multiplerecord> 

how achieve in jasperreports ireport 4.5.1.
new jr.

thanks in advance.

you can use:

<group name="type">     <groupexpression><![cdata[$f{type}]]></groupexpression> </group> 

the group can contain group header, group footer ... , can use multiple groups in jasperreport. make sure data sorted, sorting should correspond defined groups. sorting in example seems ok already. can define group in ireport designer.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -