Page Number

Page Number

Forum member · Mar 18, 2006
Wondering if you could help me with this... I am using report writer via odbc.. anyhow I am trying to create an account statement, all is well, except, I am trying to show an "opening balance" for the first line on the statement. I have achieved this in the header object before I query transactions in the body object. However, approaching this via the header object makes the opening balance list on every page of the statement. How do I reference the current page and total pages within ASP code. If this is possible I can limit my "opening balance" line to only show on the first page with a simple "if" statement. Thanks for the help in advance...

Re: Page Number

Support · Mar 20, 2006
Hello, You can get the current page number and total number of pages using the Parse property of the Label or TextArea object. Set objLabel = .AddLabel("Pagina %CP% de %TP%", 0, 0, 504, 12, DPDF_Align_Right, DPDF_Font_HelveticaBold, 12) objLabel.Parse = True Thanks, ceTe Software Support Team

Re: Page Number

Forum member · Mar 20, 2006
I dont think you understand my question. I am NOT looking to DISPLAY the page number I already do that. How would I assign the pagenumber to an ASP variable(integer) that I could reference in my code.

Re: Page Number

Support · Mar 20, 2006
Hello, You can use the PageCount property of the Document object to get the current number of pages that have been added to the document and assign that value to an ASP integer. If you want to navigate to a page that has already been added earlier, then you will have to use some sort of counter to keep track of it. Thanks, ceTe Software Support Team

Re: Page Number

Forum member · Nov 16, 2006
'PageCount' is not a member of 'ceTe.DynamicPDF.Document'. ?????????

Re: Page Number

Support · Nov 16, 2006
Hello, There is no PageCount property available in the ReportWriter product. The PageCount property belongs to Document object in the Generator product. Thanks, ceTe Software Support Team

Re: Page Number

Forum member · Nov 16, 2006
That explains it. Thanks. I want to print information only if it's the first page. With the ReportWriter product, how can that be done?

Re: Page Number

Support · Nov 16, 2006
Hello, I am sorry for my previous post. Actually you can get the value of PageCount using the Document property of the Report object. Sample line of code: value = objReport.Document.PageCount So using the above derived value you can find out if you are on first page or not. Thanks, ceTe Software Support Team