Hi Francisco,

I also designed a report with two subreports embedded.

Concerning your first problem with the Connection, I cannot say much, since
my master report executed a query. And I guess, you already passed the
connection via the connectionExpression to the subreport.

Your second problem is that the two reports overlay? Or what do you mean
with "appear one under another"? If I understood this right, it might help
if you specifiy a "positionType" with value "Float" in the second
subreport's "reportElement", as you can see in the example code below.

HTH,
Marc

>>>
       <!-- subreport for Domain -->
       <subreport>
            <reportElement isPrintRepeatedValues="false" x="0" y="20"
width="325" height="20" isRemoveLineWhenBlank="true" backcolor="#ffcc99"/>
              <subreportParameter name="parentId">

<subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="DomainSubreport">

<subreportParameterExpression><![CDATA[$P{DomainSubreport}]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="TaxonomySubreport">

<subreportParameterExpression><![CDATA[$P{TaxonomySubreport}]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="parentColumn">

<subreportParameterExpression><![CDATA["fk_domain"]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="indentation">

<subreportParameterExpression>$P{indentation}</subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="level">
                <subreportParameterExpression>new
Integer(1)</subreportParameterExpression>
              </subreportParameter>

<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
            <subreportExpression
class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{DomainSubreport}]]></subreportExpression>
        </subreport>

        <!-- subreport for Taxonomy -->
        <subreport isUsingCache="false">
            <reportElement positionType="Float"
isPrintRepeatedValues="false" x="0" y="40" width="325" height="20"
isRemoveLineWhenBlank="true" backcolor="#ffcc99"/>
              <subreportParameter name="parentId">

<subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="TaxonomySubreport">

<subreportParameterExpression><![CDATA[$P{TaxonomySubreport}]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="parentColumn">

<subreportParameterExpression><![CDATA["fk_domain"]]></subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="indentation">

<subreportParameterExpression>$P{indentation}</subreportParameterExpression>
              </subreportParameter>
              <subreportParameter name="level">
                <subreportParameterExpression>new
Integer(1)</subreportParameterExpression>
              </subreportParameter>

<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
            <subreportExpression
class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{TaxonomySubreport}]]></subreportExpression>
          </subreport>
<<<




_________________________________________________________________
Diese Information ist ausschliesslich fuer den Adressaten bestimmt und kann

vertraulich oder gesetzlich geschuetzte Informationen enthalten. Wenn Sie
nicht der bestimmungsgemaesse Adressat sind, unterrichten Sie bitte den
Absender und vernichten Sie diese Mail. Anderen als dem
bestimmungsgemaessen Adressaten ist es untersagt, diese E-Mail zu lesen, zu

speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer
zu verwenden. Wir verwenden aktuelle Virenschutzprogramme. Fuer Schaeden,
die dem Empfaenger gleichwohl durch von uns zugesandte mit Viren befallene
E-Mails entstehen, schliessen wir jede Haftung aus.

The information contained in this email is intended only for its addressee
and may contain confidential and/or privileged information. If the reader
of this email is not the intended recipient, you are hereby notified that
reading, saving, distribution or use of the content of this email in any
way is prohibited. If you have received this email in error, please notify
the sender and delete the email. We use updated antivirus protection
software.
We do not accept any responsibility for damages caused anyhow by viruses
transmitted via email.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to