[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Print footer on last page of letter



Hi Serene,
you're nearly there.  Unfortunately, the alter-printer command takes effect
on the next page to be printed, so as you are already on the last page it
will never take effect.  But you can still use the after-report syntax, and
use a flag to indicate in the footing section to print something different
on the last page.

e.g.
Begin-Setup
declare-procedure
after-report=fin_report
end-declare

End-Setup
begin-program
 while #count < 200
  print #count (1,1)
  next-listing
  add 1 to #count
 end-while
end-program

begin-footing 5
 if #last_page=1
    Print 'This is the footing on last page' (1,20)
  else
    Print 'This is the footing' (1,20)
  end-if
end-footing

begin-procedure fin_report
 let #last_page=1
end-procedure


Cheers, Steve.

-----Original Message-----
From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On
Behalf Of Serene Yeo
Sent: Tuesday, 8 July 2003 5:56 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Print footer on last page of letter


Hi all,

I have a few set of letters that is required to print footer on every pages
but a different footer on last page of letter. All footer printed are coded
in the begin-footing section.

I have searched through the forum and find out the after-report=fin-report.
But the thing is how can I code in order for this to point to the
begin-footing 100 name=footerlastPg. Because if I print the details in the
fin-report procedure. it seems it is printed in the detail section and is
not aligned with all other pages. I need to standardised all.

The following is my code:

Begin-Setup
Declare-Layout Default
  Orientation = Portrait
  Paper-Size = (A4)
  Top-Margin    = 0.591
  Bottom-Margin = 0.591
  Left-Margin   = 0.591
  Right-Margin  = 0.591
  Line-Height = 1
  Char-Width  = 1
End-Declare

declare-procedure
after-report=fin_report
end-declare

End-Setup


begin-footing 50
Print 'This is the footing' (10,20)
end-footing

begin-footing 100 name=footerlastPg
Print 'This is the footing on last page' (20,20)
end-footing

!******** This procedure does not have effect in the footing section on last
page**********
begin-procedure fin_report
   alter-report footing=footerlastPg
end-procedure

Will appreciate all of your help. Thanks.

Regards,
Serene

_________________________________________________________________
Get 10mb of inbox space with MSN Hotmail Extra Storage
http://join.msn.com/?pgmarket=en-sg at only S$36 including GST

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users