Jump to content

Rows alternating in subreport


2004 IR Help

Recommended Posts

By: msa - amysore

Rows alternating in subreport

2005-05-06 11:49

Hi,

 

I have a master report with 3 subreports

- MasterReport

-- income subReport

-- balance subReport

-- cash subReport

 

All 3 subreports use a custom datasource( with different data i.e Lists) to fill the subreports.

 

Jasper report download format is CSV.

In the CSV, I see 1 row from income subReport, the next from balance subreport and the next from cash subreport.

 

What I want is all the rows from income subreport then all the rows from balance sub report and so on.

 

 

All the sub reports are in a group header though I am not clear on what to specify for the group expression

 

This is what I have in the master report.xml

 

<detail>

<band height="41">

<subreport>

<reportElement isPrintRepeatedValues="false" x="0" y="0" width="720" height="20" isRemoveLineWhenBlank="true" backcolor="#ffcc99"/>

<subreportParameter name="year4">

<subreportParameterExpression><![CDATA[$P{year4}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="year2">

<subreportParameterExpression><![CDATA[$P{year2}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="year5">

<subreportParameterExpression><![CDATA[$P{year5}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="year3">

<subreportParameterExpression><![CDATA[$P{year3}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="year1">

<subreportParameterExpression><![CDATA[$P{year1}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[$P{IncomeDatasource}]]></dataSourceExpression>

<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{IncomeSubreport}]]></subreportExpression>

</subreport>

<subreport>

<reportElement isPrintRepeatedValues="false" x="0" y="21" width="720" height="20" isRemoveLineWhenBlank="true" backcolor="#ffcc99"/>

<dataSourceExpression><![CDATA[$P{BalanceDatasource}]]></dataSourceExpression>

<subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{BalanceSubreport}]]></subreportExpression>

</subreport>

</band>

</detail>

 

Can anyone help??

 

Thanks in advance

 

 

 

 

 

 

 

By: jorge - sirion_oef

RE: Rows alternating in subreport

2005-05-06 12:13

are these three sub reports equals?

subreport 1: columnA, columnB, columC

subreport 2: columnA, columnB, columC

subreport 3: columnA, columnB, columC

 

have these three sub reports the same functionally?

 

do they do some thing of calculation, formating on the data, different from the others?

 

the format is equal in the three?

 

if you have three reports and want to combine them why have three reports?

 

 

if you have a custom datasource you could merge the data in your aplication, create the data source and then send it to the report

 

 

 

 

By: msa - amysore

RE: Rows alternating in subreport

2005-05-11 14:14

Yes, the reports are similar in format ..

4 columns

1 String field and 3 numeric fields

 

It is possible to combine all the data and send it to the datasource, but I need to show separate header information for each of the subreports.

 

Any idea's to prevent the rows from alternating???

 

Thanks

 

 

 

 

By: jorge - sirion_oef

RE: Rows alternating in subreport

2005-05-12 09:23

the error is only in the exported format? what about others?

 

if this is true, that could be an error from jasperreports, try the latest version, or try other format

 

 

the preview window (jasperpreview) has the same error?

 

if this is true is design error

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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...