Normal Topic Report date & page number (Read 933 times)
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Report date & page number
Mar 23rd, 2011 at 8:09pm
Print Post Print Post  
How do I print the date and page number on a report like Q&A did with @date!!Page # ?
Where can I find detailed instructions on how to format report layouts? The User Guide either only has very simple examples or I'm just too dense to find them.
  
Back to top
 
IP Logged
 
mytime0127
Member
*
Offline


Q&A user since 1994

Posts: 17
Location: Boerne, Texas
Joined: Feb 25th, 2011
Re: Report date & page number
Reply #1 - Mar 23rd, 2011 at 8:21pm
Print Post Print Post  
Wow, I am so glad you asked that questions!  I also would like detailed instructions for the layout.
Is there a video or something better than the Users guide?  Embarrassed

Thanks,
Becky
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Report date & page number
Reply #2 - Mar 23rd, 2011 at 9:30pm
Print Post Print Post  
Are you using Print Only or HTML reports?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Report date & page number
Reply #3 - Mar 23rd, 2011 at 9:33pm
Print Post Print Post  
Whatever you put in Page Header or Page Footer section of the report, it will display on every page. HTML report does not follow this convention as far as I know.  If you just want to have it only once, you can put that in either Report Header or Report Footer.
  
Back to top
 
IP Logged
 
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Re: Report date & page number
Reply #4 - Mar 24th, 2011 at 10:08am
Print Post Print Post  
Hammer wrote on Mar 23rd, 2011 at 9:30pm:
Are you using Print Only or HTML reports?


I'm using Print reports.
  
Back to top
 
IP Logged
 
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Re: Report date & page number
Reply #5 - Mar 25th, 2011 at 10:02am
Print Post Print Post  
OK, back to the original question.

How do I print the date and page number on a report like Q&A did with @date!!Page # ?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report date & page number
Reply #6 - Mar 25th, 2011 at 3:01pm
Print Post Print Post  
Hello,

In your Page Header add an Unbound Value Box named Today
In your Page Footer add an Unbound Value Box named PageNumber
On the left hand side under commands click Program Layout
In Global Code put the following programming
Code
Select All
Stat gsPageNumber as Int

gsPageNumber = 0 


In the Element drop down choose Today
Put the following programming into the program editor
Code
Select All
Today = "Printed: " + @Right(@Date, 5) + "/" + @Left(@Date, 4) 


In the Element drop down choose PageNumber
Put the following programming into the program editor
Code
Select All
gsPageNumber = gsPageNumber + 1
PageNumber = "Page: " + gsPageNumber 


Close the program editor and save the report design.

This will give you Today's date in the Header and the page number in the footer for the Print Only reports. The HTML reports automatically do page numbering and have the date displayed in the header and footer.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Re: Report date & page number
Reply #7 - Mar 25th, 2011 at 6:04pm
Print Post Print Post  
Ray,
Thanks. That helps a lot, but of course I have a couple more questions.
The date is printed as 03/25/2011. I want March 25, 2011. If I change Display Format to Custom Format, Format Unbound As Date, and Date Format June 19, 2003 then the date does not print at all.

I put Today and PageNumber both in Page Header and put a space between them so that Today prints on the left and PageNumber prints on the right, but they are both printed as the very first line. I would like to have the report title printed on the first line, a blank line, the report sub-title, a blank line, the printed date and page number line, a blank line and then the data. This is why I was asking if there was some sort of tutorial or manual on report layout.
  
Back to top
 
IP Logged