好的,下面是主报告的代码" Dummy.rdl"
它有A4大小的正文和两个子报告:" Dummy_A4Sub1.rdl" ," Dummy_A4Sub2.rdl" 两个子报表也具有A4大小的主体,并且在主报表中分别由" Rectangle1" 和" Rectangle2" 包裹。
尽管如此" Hidden"属于"可见性"标签已设置" True"对于" Dummy_A4Sub2" 和" Rectangle2" 数据区域,最后会生成一个额外的页面。
有什么建议吗?我错过了什么? 提前谢谢!
" Dummy.rdl"
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Rectangle Name="Rectangle1">
<ReportItems>
<Subreport Name="Subreport1">
<ReportName>Dummy_A4Sub1</ReportName>
<Height>5.845in</Height>
<Width>8.27in</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Subreport>
</ReportItems>
<KeepTogether>true</KeepTogether>
<Height>5.845in</Height>
<Width>8.27in</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
<Rectangle Name="Rectangle2">
<ReportItems>
<Subreport Name="Subreport2">
<ReportName>Dummy_A4Sub2</ReportName>
<Height>5.845in</Height>
<Width>8.27in</Width>
<Visibility>
<Hidden>true</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Subreport>
</ReportItems>
<KeepTogether>true</KeepTogether>
<Top>5.845in</Top>
<Height>5.845in</Height>
<Width>8.27in</Width>
<ZIndex>1</ZIndex>
<Visibility>
<Hidden>true</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
</ReportItems>
<Height>11.69in</Height>
<Style />
</Body>
<Width>8.27in</Width>
<Page>
<PageHeight>11.69in</PageHeight>
<PageWidth>8.27in</PageWidth>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>85c64ecf-0c52-4234-8ca8-81e36368f77d</rd:ReportID>
</Report>
&#34; Dummy_A4Sub1.rdl&#34; (&#34; Dummy_A4Sub2.rdl&#34; 类似)
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Dummy Subreport1 A4 Size</Value>
<Style>
<FontSize>36pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>1.24875in</Top>
<Left>0.62375in</Left>
<Height>1.94792in</Height>
<Width>7.09375in</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>11.69in</Height>
<Style />
</Body>
<Width>8.27in</Width>
<Page>
<PageHeight>11.69in</PageHeight>
<PageWidth>8.27in</PageWidth>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>cfe4adb4-64c8-4225-83e2-abe05f3ba706</rd:ReportID>
</Report>
答案 0 :(得分:3)
而不是使用矩形包装子报表(以实现可见性和空间减少目标) 用Tablix包装它们:&#34; 1.创建新表 2.指向其单元格,右键单击,插入子报表 3.右键单击Tablix的行。包含插入的子报表,需要隐藏,&#34;行可见性...&#34;。在这里,您可以隐藏子报告并防止SSRS为其安排空白表。 但更有可能的是,您希望根据某些逻辑条件隐藏它