> Without knowing much about your code or system I would say you need a
> subreport to use 2 datasources. However if the data you need is in 2
> separate databases then why not use a join sql statement?
> 

The Query is 

session.createQuery(from jasperReport.Project P,jasperReport.Coverage C
where P.projectId = 1 and C.coverageId = 1)

Corresponding SQL Query:select project0_.PROJECT_ID as PROJECT1_1_0_,
coverage1_.COVERAGE_ID as COVERAGE1_0_1_, project0_.PROJECT_NAME as
PROJECT2_1_0_, coverage1_.COVERAGE_NAME as COVERAGE2_0_1_ from PROJECT
project0_, COVERAGE coverage1_ where project0_.PROJECT_ID=1 and
coverage1_.COVERAGE_ID=1

This  returns two objects. Project and Coverage.
Project Attributes:
projectId
projectName
Coverage Attributes:
coverageId
coverageName
projectFk(Foreign key - project.projectId)

Now in the JRXML

<field name = "projectId" ...> is accepted
<field name = "coverageId"...> is showing error as undefined property

Is there any wat to call the attributes separately like
project.ProjectId
coverage.coverageId??

-- 
View this message in context: 
http://www.nabble.com/Multiple-Object-in-DataSource-Collection-tp25816344p25818786.html
Sent from the jasperreports-questions mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to