Jump to content
JasperReports Library 7.0 is now available ×

Subreports-REPORT_DATA_SOURCE-Problem


Recommended Posts

By: Markus Br  g - tasskaff

Subreports-REPORT_DATA_SOURCE-Problem

2003-05-21 05:27

I have a main Report and a subreport.

 

 

I want to use the same Datasource for both reports

 

I tried it with:

 

Java:

 

JasperFillManager.fillReportToFile("bla.jasper", parameter, new JRBeanCollectionDataSource(blubb));

 

Main:

<subreport isUsingCache="true">

<reportElement

mode="Opaque"

x="36"

y="138"

width="382"

height="30"

forecolor="#000000"

backcolor="#C0C0C0"

positionType="Float"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<subreportParameter name="REPORT_DATA_SOURCE">

<subreportParameterExpression>$P{REPORT_DATA_SOURCE}</subreportParameterExpression>

</subreportParameter>

<dataSourceExpression>$P{REPORT_DATA_SOURCE}</dataSourceExpression>

<subreportExpression class="java.lang.String"><![CDATA["jasperTemplates/SubReport.jasper"]]></subreportExpression>

</subreport>

 

but no fields in the subreports (pdf) were visible

 

When I use a "new JREmptyDataSource()" as dataSourceExpression i see the fields in the subreport in fact, but all values are null.

 

I don't know what I am making wrong.

Hope somebody can help me.

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