Coditional Page breaks

I hope there will be feature for conditional page breaking in group levels and sub group levels. With Yukon, there is no such work around and this might well be one of the most awaited feature in Katamai RS.
[251 byte] By [Soven] at [2008-2-6]
# 1
Hello,

Can you elaborate more on what you are trying to accomplish? We have made one change to the area of conditional page breaks in 2008:

Previously, if a page break was defined on an object with conditional visiblitity (where the Hidden value is an expression), the page break would never occur even if the object was visible. In 2008, the page break will occur if the object is visible.

Best regards,
chris

ChrisBaldwin-MSFT at 2007-10-2 > top of Msdn Tech,SQL Server Katmai,SQL Server Katmai Reporting Services...
# 2
My problem really is having unecessary blank page which upon diagnosis is due to page break in group. It has nothing to do with width. When I don't have page break, it works fine, but I need to have those page breaks there.

Scenario
--
I have a rdl which has 2 Lists...say List1 and List2.
List1 has 2 sub Lists within it...say List1A and List1B.
In the List_Detail_Groups of List1, I have a Page Break at End Checked so that each new List will appear on the top of the new page.

Also, the List_detail_Groups of List1A has a Page Break for similar reason.

The visibility of List1B depends upon a parameter passed. So, that means, List1B can appear or can be hidden.

Now my problem is.........

When I have such a layout, there is a blank page when visibility of List1B is hidden. If I do not put page break, then its fine even though List1B is hidden.

It is weird to say whether this blank page is caused by page break in List1 or really a group being hidden. If I remove page break in List1, there is no blank page whatsoever, however, having a page break is required for each group to appear on top of the new page. And one sub group within that group to appear on top of the new page. I hope this scenario is strongly considered for a way of enhancement in KATAMAI.

Soven at 2007-10-2 > top of Msdn Tech,SQL Server Katmai,SQL Server Katmai Reporting Services...
# 3

Hi,

I can't really understand what your scenario is based on your description. Can you send me your RDL file along with some screenshots that point out the behavior you are describing? You can get my email from my profile, just remove the "online." part.

Thanks,

Chris

ChrisBaldwin-MSFT at 2007-10-2 > top of Msdn Tech,SQL Server Katmai,SQL Server Katmai Reporting Services...
# 4

Sorry, I should have done this earlier... here is the rdl code...this is the complete one..

Code Snippet

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="AdventureWorks">
<rd:DataSourceID>7205c569-71ff-4084-874d-6678059f176f</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=SSPI</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<InteractiveHeight>11in</InteractiveHeight>
<ReportParameters>
<ReportParameter Name="tid">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>1</Value>
</Values>
</DefaultValue>
<Prompt>tid</Prompt>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<RightMargin>.25in</RightMargin>
<LeftMargin>.25in</LeftMargin>
<PageHeader>
<Height>0pt</Height>
</PageHeader>
<BottomMargin>.25in</BottomMargin>
<rd:ReportID>32904dff-70ea-41fc-9fec-a044100702ee</rd:ReportID>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>AdventureWorks</DataSourceName>
<CommandText>SELECT Sales.SalesTerritory.TerritoryID, Sales.SalesTerritory.Name, Sales.SalesTerritory.CountryRegionCode, Sales.SalesTerritory.[Group], Sales.SalesTerritory.SalesYTD, Sales.SalesTerritory.SalesLastYear, Sales.SalesTerritory.CostYTD, Sales.SalesTerritory.CostLastYear, Sales.SalesPerson.SalesPersonID, Sales.SalesPerson.SalesQuota, Sales.SalesPerson.Bonus, Sales.SalesPerson.CommissionPct, Sales.Store.CustomerID, Sales.Store.Demographics, Sales.Customer.CustomerID AS EXPR10, Sales.Customer.AccountNumber, Sales.Customer.CustomerType, Sales.Store.Name AS CustName
FROM Sales.SalesTerritory INNER JOIN Sales.SalesPerson ON Sales.SalesTerritory.TerritoryID = Sales.SalesPerson.TerritoryID INNER JOIN Sales.Store ON Sales.SalesPerson.SalesPersonID = Sales.Store.SalesPersonID INNER JOIN Sales.Customer ON Sales.SalesTerritory.TerritoryID = Sales.Customer.TerritoryID AND Sales.Store.CustomerID = Sales.Customer.CustomerID where Sales.SalesTerritory.TerritoryID=@tid</CommandText>
<QueryParameters>
<QueryParameter Name="@tid">
<Value>=Parameters!tid.Value</Value>
</QueryParameter>
</QueryParameters>
</Query>
<Fields>
<Field Name="TerritoryID">
<DataField>TerritoryID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Name">
<DataField>Name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CountryRegionCode">
<DataField>CountryRegionCode</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Group">
<DataField>Group</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SalesYTD">
<DataField>SalesYTD</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="SalesLastYear">
<DataField>SalesLastYear</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="CostYTD">
<DataField>CostYTD</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="CostLastYear">
<DataField>CostLastYear</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="SalesPersonID">
<DataField>SalesPersonID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="SalesQuota">
<DataField>SalesQuota</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Bonus">
<DataField>Bonus</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="CommissionPct">
<DataField>CommissionPct</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="CustomerID">
<DataField>CustomerID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Demographics">
<DataField>Demographics</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="EXPR10">
<DataField>EXPR10</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="AccountNumber">
<DataField>AccountNumber</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CustomerType">
<DataField>CustomerType</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CustName">
<DataField>CustName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>7.5in</Width>
<Body>
<ReportItems>
<List Name="list4">
<ZIndex>1</ZIndex>
<Left>9.0pt</Left>
<DataSetName>DataSet1</DataSetName>
<ReportItems>
<Textbox Name="textbox6">
<Top>0.5in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.25in</Left>
<Height>0.25in</Height>
<Value>Demographics:</Value>
</Textbox>
<Textbox Name="textbox5">
<Top>0.125in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.25in</Left>
<Height>0.25in</Height>
<Value>Customer Name:</Value>
</Textbox>
<Textbox Name="Demographics">
<rd:DefaultName>Demographics</rd:DefaultName>
<Top>36.7pt</Top>
<Width>318.47pt</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>true</CanGrow>
<Left>117.4pt</Left>
<Height>86.61pt</Height>
<Value>=First(Fields!Demographics.Value)</Value>
</Textbox>
<Textbox Name="Name_1">
<rd:DefaultName>Name_1</rd:DefaultName>
<Top>0.125in</Top>
<Width>1.875in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<CanGrow>true</CanGrow>
<Left>1.625in</Left>
<Height>0.25in</Height>
<Value>=First(Fields!Name.Value)</Value>
</Textbox>
</ReportItems>
<Top>274.4pt</Top>
<Width>475.03pt</Width>
<Style>
<BackgroundColor>DarkGray</BackgroundColor>
<BorderStyle />
<BorderColor />
<BorderWidth />
</Style>
<Grouping Name="list4_Details_Group">
<GroupExpressions>
<GroupExpression>=Fields!CustomerID.Value</GroupExpression>
</GroupExpressions>
<PageBreakAtStart>false</PageBreakAtStart>
<PageBreakAtEnd>false</PageBreakAtEnd>
</Grouping>
<Height>120.38pt</Height>
<PageBreakAtStart>false</PageBreakAtStart>
<PageBreakAtEnd>false</PageBreakAtEnd>
</List>
<List Name="list1">
<Left>9.02pt</Left>
<DataSetName>DataSet1</DataSetName>
<ReportItems>
<Textbox Name="Name">
<rd:DefaultName>Name</rd:DefaultName>
<Top>0.125in</Top>
<Width>2.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.25in</Left>
<Height>0.25in</Height>
<Value>=Fields!Name.Value</Value>
</Textbox>
<List Name="list3">
<ZIndex>1</ZIndex>
<Left>20.4pt</Left>
<Visibility>
<Hidden>=iif(Parameters!tid.Value ="1",false, true)</Hidden>
</Visibility>
<ReportItems>
<Textbox Name="SalesPersonID">
<rd:DefaultName>SalesPersonID</rd:DefaultName>
<Top>0.125in</Top>
<Width>2in</Width>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>7</ZIndex>
<CanGrow>true</CanGrow>
<Left>1.5in</Left>
<Height>0.25in</Height>
<Value>=Fields!SalesPersonID.Value</Value>
</Textbox>
<Textbox Name="textbox4">
<Top>1.25in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>6</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>Commission %</Value>
</Textbox>
<Textbox Name="textbox3">
<Top>0.875in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>5</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>SalesQuota</Value>
</Textbox>
<Textbox Name="textbox2">
<Top>0.5in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>4</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>Bonus</Value>
</Textbox>
<Textbox Name="CommissionPct">
<rd:DefaultName>CommissionPct</rd:DefaultName>
<Top>1.25in</Top>
<Width>2in</Width>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Left>1.5in</Left>
<Height>0.25in</Height>
<Value>=Fields!CommissionPct.Value</Value>
</Textbox>
<Textbox Name="SalesQuota">
<rd:DefaultName>SalesQuota</rd:DefaultName>
<Top>0.875in</Top>
<Width>1.875in</Width>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Left>1.5in</Left>
<Height>0.25in</Height>
<Value>=Fields!SalesQuota.Value</Value>
</Textbox>
<Textbox Name="Bonus">
<rd:DefaultName>Bonus</rd:DefaultName>
<Top>0.5in</Top>
<Width>2in</Width>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>true</CanGrow>
<Left>1.5in</Left>
<Height>0.25in</Height>
<Value>=Fields!Bonus.Value</Value>
</Textbox>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<Top>0.125in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>SalesPerson ID</Value>
</Textbox>
</ReportItems>
<Top>129.6pt</Top>
<Width>450.95pt</Width>
<Style>
<BackgroundColor>Silver</BackgroundColor>
<BorderStyle />
<BorderColor />
<BorderWidth />
</Style>
<Height>126.47pt</Height>
<DataSetName>DataSet1</DataSetName>
<KeepTogether>false</KeepTogether>
<PageBreakAtStart>false</PageBreakAtStart>
<Grouping Name="SID">
<PageBreakAtStart>false</PageBreakAtStart>
<PageBreakAtEnd>false</PageBreakAtEnd>
<GroupExpressions>
<GroupExpression>=Fields!SalesPersonID.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</List>
<List Name="list2">
<Left>22.7pt</Left>
<DataSetName>DataSet1</DataSetName>
<ReportItems>
<Textbox Name="textbox9">
<Top>1in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>5</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>Customer Type</Value>
</Textbox>
<Textbox Name="CustomerType">
<rd:DefaultName>CustomerType</rd:DefaultName>
<Top>73.04pt</Top>
<Width>201.75pt</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>4</ZIndex>
<CanGrow>true</CanGrow>
<Left>126.47pt</Left>
<Height>17.30pt</Height>
<Value>=First(Fields!CustomerType.Value)</Value>
</Textbox>
<Textbox Name="CustomerID_1">
<rd:DefaultName>CustomerID_1</rd:DefaultName>
<Top>18.07pt</Top>
<Width>162.61pt</Width>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Left>126.47pt</Left>
<Height>18.07pt</Height>
<Value>=First(Fields!CustomerID.Value)</Value>
</Textbox>
<Textbox Name="textbox8">
<Top>0.625in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>Account Number</Value>
</Textbox>
<Textbox Name="AccountNumber">
<rd:DefaultName>AccountNumber</rd:DefaultName>
<Top>46.63pt</Top>
<Width>243.16pt</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>true</CanGrow>
<Left>126.47pt</Left>
<Height>16.59pt</Height>
<Value>=First(Fields!AccountNumber.Value)</Value>
</Textbox>
<Textbox Name="textbox7">
<Top>0.25in</Top>
<Width>1.25in</Width>
<Style>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<CanGrow>true</CanGrow>
<Left>0.125in</Left>
<Height>0.25in</Height>
<Value>Customer</Value>
</Textbox>
</ReportItems>
<Top>25.8pt</Top>
<Width>448.69pt</Width>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle />
<BorderColor />
<BorderWidth />
</Style>
<Grouping Name="list2_Details_Group">
<GroupExpressions>
<GroupExpression>=Fields!CustomerID.Value</GroupExpression>
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd>
<PageBreakAtStart>false</PageBreakAtStart>
</Grouping>
<Height>99.36pt</Height>
<KeepTogether>false</KeepTogether>
<PageBreakAtStart>false</PageBreakAtStart>
</List>
</ReportItems>
<Top>8.27pt</Top>
<Width>476.66pt</Width>
<Style>
<BackgroundColor>Gainsboro</BackgroundColor>
<BorderStyle />
<BorderColor />
<BorderWidth />
</Style>
<Grouping Name="list1_Details_Group">
<GroupExpressions>
<GroupExpression>=Fields!Name.Value</GroupExpression>
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd>
</Grouping>
<Height>265.77pt</Height>
<KeepTogether>false</KeepTogether>
<PageBreakAtStart>false</PageBreakAtStart>
</List>
</ReportItems>
<Height>11in</Height>
</Body>
<Language>en-US</Language>
<PageFooter>
<Height>0pt</Height>
</PageFooter>
<TopMargin>.25in</TopMargin>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
</Report>

Soven at 2007-10-2 > top of Msdn Tech,SQL Server Katmai,SQL Server Katmai Reporting Services...
# 5

I tried your report and couldn't reproduce the blank page you were seeing when List1B/list3 was hidden. Do you have a pagebreak set on that list as well?

With that said, in Katmai, we have added new functionality you can use to control where the pagebreak is, e.g. AtStart, AtEnd or Between. So for your case, you may want to try Between.


This posting is provided "AS IS" with no warranties, and confers no rights.

FangWang-MSFT at 2007-10-2 > top of Msdn Tech,SQL Server Katmai,SQL Server Katmai Reporting Services...

SQL Server Katmai

Site Classified