Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(mailing labels) How to get physical page break on group change?

Status
Not open for further replies.

RippleBirder

Programmer
Mar 8, 2011
1
0
0
CA
Reporting Services 2008: I'm generating labels (Avery 5160 : 3 across, 10 down) for a school. Grouping of students is by grade. Each new grade must start printing on a new sheet of labels. We must not start printing a grade's group on the next available column of labels on a partially used sheet. The reason we cannot have more than one grade group on a physical sheet of labels is that the sheets are taken off of the printer and handed directly to the grade's teacher. No one will cut the sheet coming out of the printer to separate grades.

When I put a page break between grade groups the next grade prints on the next available column of the label sheet. How can I force extra breaks to get the next grade to print on the next label sheet in the printer? I understand that Reporting Services treats each column in a multi-column report as a page--so it would be the equivalent of forcing extra page breaks (an extra one or two page breaks depending in which column the last data item for the prior group printed).

Below is my code from the Reporting Services 2008 .rdl file.

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd=" xmlns=" <DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>dsrc_TRPROD</DataSourceReference>
<rd:DataSourceID>2f7891dc-9e1f-448a-a572-0d88aa9d7916</rd:DataSourceID>
<rd:SecurityType>None</rd:SecurityType>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="school">
<DataField>school</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="class">
<DataField>class</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="student">
<DataField>student</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>select 'North Elementary' as school, 'Grade 1' as class, 'Brown' as student
union
select 'North Elementary' as school, 'Grade 1' as class, 'Green' as student
union
select 'North Elementary' as school, 'Grade 2' as class, 'Smith' as student
union
select 'North Elementary' as school, 'Grade 2' as class, 'Jones' as student
union
select 'North Elementary' as school, 'Grade 3' as class, 'Black' as student
union
select 'North Elementary' as school, 'Grade 3' as class, 'Thomas' as student</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<Body>
<ReportItems>
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>2.63542in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>1.25708in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Rectangle Name="Rectangle1">
<ReportItems>
<Rectangle Name="Rectangle2">
<ReportItems>
<Textbox Name="class">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!class.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>class</rd:DefaultName>
<Top>0.08in</Top>
<Left>0.21542in</Left>
<Height>0.25in</Height>
<Width>1in</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="student">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!student.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>student</rd:DefaultName>
<Top>0.69458in</Top>
<Left>0.65292in</Left>
<Height>0.25in</Height>
<Width>1.73958in</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>1.25708in</Height>
<Width>2.63542in</Width>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Rectangle>
</ReportItems>
<KeepTogether>true</KeepTogether>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="Group1">
<GroupExpressions>
<GroupExpression>=Fields!class.Value</GroupExpression>
</GroupExpressions>
<PageBreak>
<BreakLocation>Between</BreakLocation>
</PageBreak>
</Group>
<TablixMembers>
<TablixMember>
<Group Name="Details" />
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Height>1.25708in</Height>
<Width>2.63542in</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
</ReportItems>
<Height>1.25708in</Height>
<Style />
</Body>
<Width>2.63542in</Width>
<Page>
<PageHeight>8.5in</PageHeight>
<PageWidth>11in</PageWidth>
<Columns>3</Columns>
<ColumnSpacing>0.05118in</ColumnSpacing>
<Style />
</Page>
<rd:ReportID>291fbbbc-851a-4d18-8ae6-86c8706bb1e9</rd:ReportID>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
</Report>
 
Group on grade in teh tablix if you are not already.Properties of the group should allow for page break on change

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top