Jump to content
Changes to the Jaspersoft community edition download ×

Grouping in excel


yvkvijay

Recommended Posts

 Hi

 

How to do grouping and ungrouping with excel ouput uisn ireport for four levels ??

 

can anyone please give me sample jrxml file how to do it??

Any suggestions/help is appreciated

I was doing like this. can anyone correct me what i am doing wrong?

<group name="first">

<groupExpression><![CDATA[$F{first}]]></groupExpression>

<groupHeader>

<band height="21">

<textField>

<reportElement x="0" y="0" width="100" height="20"/>

<textElement/>

<textFieldExpression><![CDATA[$F{first}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

</group>

<group name="second" isStartNewColumn="true">

<groupExpression><![CDATA[$F{second}]]></groupExpression>

<groupHeader>

<band height="20">

<textField>

<reportElement x="0" y="0" width="100" height="20">

<property name="net.sf.jasperreports.export.xls.row.outline.level.1" value="Body"/>

</reportElement>

<textElement/>

<textFieldExpression><![CDATA[$F{second}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

</group>

<group name="third">

<groupExpression><![CDATA[$F{third}]]></groupExpression>

<groupHeader>

<band height="22">

<textField>

<reportElement x="0" y="0" width="100" height="20">

<property name="net.sf.jasperreports.export.xls.row.outline.level.2" value="Body"/>

</reportElement>

<textElement/>

<textFieldExpression><![CDATA[$F{third}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

</group>

<group name="fourth">

<groupExpression><![CDATA[$F{fourth}]]></groupExpression>

<groupHeader>

<band height="21">

<textField>

<reportElement x="0" y="0" width="100" height="20">

<property name="net.sf.jasperreports.export.xls.row.outline.level.3" value="Body"/>

</reportElement>

<textElement/>

<textFieldExpression><![CDATA[$F{fourth}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

</group>

Link to comment
Share on other sites

  • 1 year later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...