Jump to content
Changes to the Jaspersoft community edition download ×

Repeating record in subreport

2004 IR Help

Recommended Posts

By: bug123 - bug123

Repeating record in subreport

2004-07-11 19:22

Hi, I create a subreport based on different ID. The ID is getted from database. For ID1, the main report will print the ID1 details and the subreport will query the reference details relating to ID1. Similarly, ID2 will show the main report and subreport of ID2 too. But, I get a problem is that the main report print the ID1 detail. Then the subreport print all reference detail of ID1, ID2, ID3....I don't know why the subreport print all details at once. I have set the group of ID. I don't know why it occurs. Please help. Thanks.





By: Juan Ara - fi2net@Spain - laureke

RE: Repeating record in subreport

2004-07-12 02:13

did u pass id from main record to subreport and did u have the parameter on the query?





By: bug123 - bug123

RE: Repeating record in subreport

2004-07-12 21:09

I have passed an parameter "ID" to the subreport.

I have set the query as "select * from table where id = '$P{ID}'". Am I right?






By: C-Box - c-box

RE: Repeating record in subreport

2004-07-12 22:58

Don't use the "'" for your Query.


try this one instead:

<queryString><![CDATA[select * from table where id = $P{ID}]]></queryString>


Note the "!" before the whole query.


and be also sure to pass the fieldvalue to the parameter "ID" within your MasterReport.

(e.g. <subreportParameter name="ID"> <subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression>





Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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