[AccessD] changing report caption via code for display in print que

John Bartow john at winhaven.net
Wed Apr 14 20:55:42 CDT 2010


I'm working on making niceties for an application which generates about
30,000 sheets to be printed by a Imagerunner 110 device. This device uses a
Linux controller box to que/hold/start the jobs. Since there are so many
jobs it would be nice to be able to distinguish them while in the que. So
I'm attempting to have the account number of each client show up in the
caption of the report when printed in order to have the account number show
in the print que of the printer. Depending on the report it should appear
something like: Order Form - 029384
 
In my procedural code I use this type of command to print various reports:
DoCmd.OpenReport "rptOrderForm", acViewNormal
 
I placed this in the report's module expecting it to accomplish this task:
Private Sub Report_Open(Cancel As Integer)
Me.Caption = Me.Caption & " - " & CurrentAcct()
End Sub
 
The report will display the caption as I intended if opened in a preview
window and then it will display it in the print que once printed but it will
not display it if opened with acViewNormal which sends it directly to the
printer.
 
Anyone have an idea of how I can achieve the intended results?
 
Tia,
John B.




More information about the AccessD mailing list