Jump to content
We've recently updated our Privacy Statement, available here ×

How - subreports using JRBeanCollectionDataSource


kunkasurendra

Recommended Posts

Hi,

 

I have the experience on working subreports using queries,but in my current project,we are using the stored procedures,first we will get the resultset and then placed into the collection object,using colection object we have to generate the subreports,

 

I have done the normal reports using JRBeanCollectionDatasurce,but i am not able to do the subreports,

 

Please can any one help me,how to work on subreports using JRBeanCollectionDatasource.

 

if any one has worked on the subreports using JRBeanCollectionDatasource,please give me the hints ot tell me the procedure how to work.

 

Thanks in Advance,

K.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

For example, if you have $F{cast} as a collection, you can just pass new JRBeanCollectionDataSource($F{cast}) to your subreport.

 

Ex.

 

<subreport>

<reportElement positionType="Float" x="20" y="25" width="240" height="20" isRemoveLineWhenBlank="true" backcolor="#99ccff"/>

<dataSourceExpression>new JRBeanCollectionDataSource($F{cast})</dataSourceExpression>

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

</subreport>

Link to comment
Share on other sites

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