Jump to content
Changes to the Jaspersoft community edition download ×

Subreport not shows


ktrinad

Recommended Posts

By: Peter Korolev - pet_on

Subreport not shows

2003-11-06 00:15

My master report has three subreports. But only single subreport shows. First subreport I put in detail band. Second subreport I put in group header and third subreport in group footer. If I put single subreport in master report it shows well. I donÂ’t understand whyÂ… Please somebody help! Here is my xml of master report:

<?xml version="1.0" encoding="UTF-8" ?>

<!-- Created with iReport - A designer for JasperReports -->

<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd";>

<jasperReport

name="ActReportMain"

columnCount="1"

printOrder="Vertical"

orientation="Portrait"

pageWidth="595"

pageHeight="842"

columnWidth="535"

columnSpacing="0"

leftMargin="30"

rightMargin="30"

topMargin="20"

bottomMargin="20"

whenNoDataType="NoPages"

isTitleNewPage="false"

isSummaryNewPage="false">

<parameter name="ActReportPage1" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="MainDataSource" isForPrompting="true" class="ru.elektra.mcc.reports.SimpleReportDataSource"/>

<parameter name="ActReportPage2" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="ActReportPage3" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="ActReportExpelWork" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="ActReportActions" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="ActReportNeedActions" isForPrompting="true" class="dori.jasper.engine.JasperReport"/>

<parameter name="ActReportExpelWorkDataSource" isForPrompting="true" class="ru.elektra.mcc.reports.SimpleReportDataSource"/>

<parameter name="ActReportActionsDataSource" isForPrompting="true" class="ru.elektra.mcc.reports.SimpleReportDataSource"/>

<parameter name="ActReportNeedActionsDataSource" isForPrompting="true" class="ru.elektra.mcc.reports.SimpleReportDataSource"/>

<group name="MyGroup" isStartNewColumn="false" isStartNewPage="false" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" >

<groupExpression></groupExpression>

<groupHeader>

<band height="50">

<subreport isUsingCache="true">

<reportElement

mode="Opaque"

x="0"

y="9"

width="535"

height="28"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<dataSourceExpression>$P{MainDataSource}</dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{ActReportPage1}]]></subreportExpression>

</subreport>

</band>

</groupHeader>

<groupFooter>

<band height="50">

<subreport isUsingCache="true">

<reportElement

mode="Opaque"

x="0"

y="11"

width="535"

height="28"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<dataSourceExpression>$P{MainDataSource}</dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{ActReportPage3}]]></subreportExpression>

</subreport> -->

</band>

</groupFooter>

</group>

<detail>

<band height="50">

<subreport isUsingCache="true">

<reportElement

mode="Opaque"

x="0"

y="9"

width="535"

height="28"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<subreportParameter name="ActReportExpelWork">

<subreportParameterExpression>$P{ActReportExpelWork}</subreportParameterExpression>

</subreportParameter>

<subreportParameter name="ActReportActions">

<subreportParameterExpression>$P{ActReportActions}</subreportParameterExpression>

</subreportParameter>

<subreportParameter name="ActReportNeedActions">

<subreportParameterExpression>$P{ActReportNeedActions}</subreportParameterExpression>

</subreportParameter>

<subreportParameter name="ActReportExpelWorkDataSource">

<subreportParameterExpression>$P{ActReportExpelWorkDataSource}</subreportParameterExpression>

</subreportParameter>

<subreportParameter name="ActReportActionsDataSource">

<subreportParameterExpression>$P{ActReportActionsDataSource}</subreportParameterExpression>

</subreportParameter>

<subreportParameter name="ActReportNeedActionsDataSource">

<subreportParameterExpression>$P{ActReportNeedActionsDataSource}</subreportParameterExpression>

</subreportParameter>

<dataSourceExpression>$P{MainDataSource}</dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{ActReportPage2}]]></subreportExpression>

</subreport>

</band>

</detail>

</jasperReport>

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