Jump to content
Changes to the Jaspersoft community edition download ×

Hibernate with subReport


2004 IR Help

Recommended Posts

By: goofy - byunglee

Hibernate with subReport

2005-05-11 09:38

Hi.

 

I retrieved list of hibernate objects contains subsets of another hibernates. Using this list of top object, I'd like to create muti-layered reports like main report, sub1 report, and sub2 report.

 

Can anyone share how to do that?

 

 

 

 

By: goofy - byunglee

RE: Hibernate with subReport

2005-05-11 09:50

The subset of hibetnate object is also list

 

 

 

 

By: macoute - macoute

RE: Hibernate with subReport

2005-05-12 01:20

the hibernate issue is a problem of the datasource

 

 

 

 

By: bourridhh - bourridhh

RE: Hibernate with subReport

2005-05-12 07:41

hi,

I ll give you an example:

You have an object Student that have some fields

name

dateOfBirth

Set notes = new HashSet()

Note(Observation,note)

your main report have a JRBeanCollectionDataSource based on the set of Students.

Then in your main report you will have three fieds

$F{name}-->String

$F{dateOfBirth}-->java.util.Date

$F{notes}--->java.lang.Object

 

in your main report now ,your subReport is declared like this

<subreport isUsingCache="true">

--------------------------

----------------/>

 

<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.Collection)($F{notes}))]]></dataSourceExpression>

-------------------------------

</subreport>

 

hope it helps

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