Question:How can I reset my page number back to 1 every time I get a group break? Answer:Resetting the page number on group breaks isn’t natively supported, but it can be achieved by tracking group breaks in a shared variable and subtracting off the page offset of the first page of the group from the…
Month: January 2006
GroupPageReset.rdl
<?xml version=”1.0″ encoding=”utf-8″?><Report xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition” xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner”> <PageHeader> <ReportItems> <Textbox Name=”PageNumber”> <Style> <PaddingLeft>2pt</PaddingLeft> <BorderStyle> <Default>Solid</Default> </BorderStyle> <PaddingBottom>2pt</PaddingBottom> <PaddingTop>2pt</PaddingTop> <PaddingRight>2pt</PaddingRight> </Style> <ZIndex>1</ZIndex> <Height>0.375in</Height> <Width>1.5in</Width> <CanGrow>true</CanGrow> <Value>=”Page: ” & Globals!PageNumber</Value> </Textbox> <Textbox Name=”GroupPage”> <Style> <PaddingLeft>2pt</PaddingLeft> <BorderStyle> <Default>Solid</Default> </BorderStyle> <PaddingBottom>2pt</PaddingBottom> <PaddingTop>2pt</PaddingTop> <PaddingRight>2pt</PaddingRight> </Style> <Height>0.375in</Height> <Width>3.625in</Width> <CanGrow>true</CanGrow> <Value>=”Grouped Page: ” & Code.GetGroupPageNumber(ReportItems!Category.Value,Globals!PageNumber)</Value> <Left>1.75in</Left> </Textbox> </ReportItems> <PrintOnLastPage>true</PrintOnLastPage> <PrintOnFirstPage>true</PrintOnFirstPage> <Style /> <Height>0.5in</Height> </PageHeader> …