Normal Topic How to put "Date Printed" on Reports? (Read 865 times)
AK Painting Inc
Member
*
Offline



Posts: 1
Joined: Jun 27th, 2014
How to put "Date Printed" on Reports?
May 19th, 2015 at 7:33pm
Print Post Print Post  
Can anyone help me with formatting my reports so that the date printed is automatically generated and placed on the header or footer of my report?

I have looked through the User Guide and Googled to no avail.

Would really appreciate help! Thank you!  Smiley
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: How to put "Date Printed" on Reports?
Reply #1 - May 20th, 2015 at 2:17am
Print Post Print Post  
Place a static text element in the header or footer. In the "On Print" event for that element, set the label of the element to the current date:

Code
Select All
label(LE6, @Date)
 


You could, of course, format it nicely, if you don't prefer yyyy/mm/dd, either using the string functions, or "@AsFormattedByLE".

Or place an unbound value box in the header or footer and set it's value to @Date:

Code
Select All
LE7 = @Date
 



And set the "Format Unbound As" setting to date. Which will give you the option of either using your system's date format, or any of the twenty-some date formats provided by Sesame.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: How to put "Date Printed" on Reports?
Reply #2 - Jun 9th, 2015 at 8:32pm
Print Post Print Post  
You can create an element called "when", then apply the following programming to the element when printing:


when = "PRINTED ON " + @Mid(@STR(@DATE), 6, 5) + "/" + @Lt(@Str(@date),4)

I've used this on all my reports and it's easy to copy from one report to another.
  
Back to top
 
IP Logged