<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx</link><description>Chris hasn't gotten a chance to update his Sleazy Hacks Weblog so I thought I would post this in the meantime. 
 Resetting the page number in a report isn’t natively supported in Reporting Services, but there is a partial workaround. 
 First, add this</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#3525405</link><pubDate>Mon, 25 Jun 2007 22:02:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3525405</guid><dc:creator>JStevens</dc:creator><description>&lt;p&gt;The report I was working on required that the header for the group be shown for every page. &amp;nbsp;So, after trying everything I said “Let’s group on the row number!” &amp;nbsp;If we know how many rows are on a page we can calculate the page number and force a page break! &amp;nbsp;For example you group by the customer ID and add a second grouping &amp;nbsp;on the row number. &lt;/p&gt;
&lt;p&gt;Group 1 Expression&lt;/p&gt;
&lt;p&gt;=Fields!CustomerID.Value&lt;/p&gt;
&lt;p&gt;Group 2 Expression&lt;/p&gt;
&lt;p&gt;=(RowNumber(&amp;quot;table1_Group1&amp;quot;) - 1) \ 10 + 1&lt;/p&gt;
&lt;p&gt;On the group properties set “Page break at end” to True&lt;/p&gt;
&lt;p&gt;This gives us 10 records on a page. &amp;nbsp;If we need to display the page number and total number of pages for this group we can use this expression in the group 2 header. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;= “Page “ + (RowNumber(&amp;quot;table1_Group1&amp;quot;) - 1) \ 10 + 1 &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;amp; &amp;quot; of &amp;quot; &amp;amp; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;((Count( Fields!CustomerID.Value, &amp;quot;table1_Group1&amp;quot; )-1) \ 10 + 1)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3525405" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#2696121</link><pubDate>Thu, 17 May 2007 17:28:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2696121</guid><dc:creator>danny</dc:creator><description>&lt;p&gt;Is there a way to do reset the page range? &amp;nbsp;So, if I have three invoices totalling 20 pages, it would be:&lt;/p&gt;
&lt;p&gt;Invoice 1: Page x of 10&lt;/p&gt;
&lt;p&gt;Invoice 2: Page x of 5&lt;/p&gt;
&lt;p&gt;Invoice 3: Page x of 10&lt;/p&gt;
&lt;p&gt;So, is there a way to get a total page count for a specific group?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2696121" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#1333725</link><pubDate>Thu, 21 Dec 2006 01:25:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1333725</guid><dc:creator>James</dc:creator><description>&lt;p&gt;This is all fine and wonderful, but I'm getting a blank page printing in front of every subreport - for two subreports which span seven pages, I'm getting seven content pages and two blank ones with page numbers on the bottom. &lt;/p&gt;
&lt;p&gt;I know this is caused by the header printing in front of the subreport, but how do you get rid of it? Setting the header row's visibility to false makes the above code not work...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1333725" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#1088962</link><pubDate>Fri, 17 Nov 2006 00:37:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1088962</guid><dc:creator>Sher</dc:creator><description>&lt;p&gt;I have this working mostly in my report with the following exception:&lt;/p&gt;
&lt;p&gt;- Body of the report prints but in the group footer there is a sub report that prints the notes. &amp;nbsp;If this goes onto page # 2, the Page header still shows Page # 1. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any ideas on this one?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1088962" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#850283</link><pubDate>Fri, 20 Oct 2006 23:02:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:850283</guid><dc:creator>Tim</dc:creator><description>&lt;p&gt;&amp;quot;If the same user runs the report more than once at the same time, they’d screw up their page numbers, but that’s probably not worth worrying about.&amp;quot;&lt;/p&gt;
&lt;p&gt;Running the report and then printing it has the effect of running it twice as the same user without resetting the shared offset. &amp;nbsp;Seems pretty important to me...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=850283" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#669344</link><pubDate>Tue, 18 Jul 2006 09:40:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:669344</guid><dc:creator>muhsin</dc:creator><description>I want to use the total page count in the report body. Can you help me by writing its vb code or anything else useful? Thanks.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=669344" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#606047</link><pubDate>Wed, 24 May 2006 18:33:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:606047</guid><dc:creator>Ravin</dc:creator><description>This code gives error at the page header / footer level.&lt;br&gt;I am using sql 2005 reporting services.&lt;br&gt;I even used Brian Welcker's Weblog but that also gave error.&lt;br&gt;Is there any other way to reset the page numbers at the group data level in sql 2005 reporting services. I need for my batch job.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=606047" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#548609</link><pubDate>Fri, 10 Mar 2006 19:03:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:548609</guid><dc:creator>CraigZello</dc:creator><description>Is there anything similiar for resetting page numbers for subreports?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=548609" width="1" height="1"&gt;</description></item><item><title>re: Dig Me Out (Resetting Report Page Numbers)</title><link>http://blogs.msdn.com/b/bwelcker/archive/2005/05/19/420046.aspx#471910</link><pubDate>Tue, 20 Sep 2005 21:51:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:471910</guid><dc:creator>Sher</dc:creator><description>I can't believe it is this hard.  Thanks for this information as I couldn't find out how to do this anywhere.&lt;br&gt;&lt;br&gt;Now, I need to suppress the footer on every page except for the last page for the group.  Any ideas on that one?&lt;br&gt;&lt;br&gt;Thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=471910" width="1" height="1"&gt;</description></item></channel></rss>