Print Page | Close Window

add page #

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14257
Printed Date: 15 November 2024 at 1:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: add page #
Posted By: moe188
Subject: add page #
Date Posted: 10 May 2009 at 6:21pm
hi,
how can I be able to add the page # when I send the reportcontrol to the printer?
thank you



Replies:
Posted By: moe188
Date Posted: 15 May 2009 at 6:29pm
Any idea ?
please help....


Posted By: Aaron
Date Posted: 16 May 2009 at 9:37am
Hi,
 
You can use:
 
wndReportControl.PrintOptions.Header.FormatString = "Page &p of &P"
 
or
 
wndReportControl.PrintOptions.Footer.FormatString = "Page &p of &P"
 
For more options see help file.
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: moe188
Date Posted: 16 May 2009 at 4:16pm
thank you for the reply.
your code works just fine, but the only problem that I have now, is that I did have some details to show in the footer, but when I added your code "Footer" part, my details is gone:
my code:
wndReportControl.PrintOptions.Footer.TextLeft = Format(Date, "dddd, mmmm dd, yyyy") & vbLf & Time
wndReportControl.PrintOptions.Footer.FormatString = "Page &p of &P"
my report after adding the page at the bottom, the date is gone, please help !!!
Thank you


Posted By: Aaron
Date Posted: 19 May 2009 at 2:23pm

Hi,

 
wndReportControl.PrintOptions.Footer.FormatString = "Date: &D Time: &T &b Page &p of &P"
 
Output:
 
 
 
 
wndReportControl.PrintOptions.Footer.FormatString = "Date: &D \nTime: &T &b Page &p of &P"
 
Output:
 
 
 
 
 
These are options to format strings in header / footer
 
 &d  Date in short format (as specified by Regional Settings in Control Panel)
 &D  Date in long format (as specified by Regional Settings in Control Panel)

 &t  Time in the format specified by Regional Settings in Control Panel
 &T  Time in 24-hour format

 &p  Current page number
 &P  Total number of pages

 &b  The text immediately following these characters as centered.
 &b&b    The text immediately following the first "&b" as centered, and the text following the second "&b" as right-justified.

 &w  Window title

 &&  A single ampersand (&)
 \n  new line marker

 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: moe188
Date Posted: 19 May 2009 at 4:43pm
Thank you very very very much, you are always there when needed.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net