guides:programming:programmers_reference_manual:loaddoc_set_printer_message

LOADDOC Set_Printer Message

The LOADDOC message is used to load a previously created report that was saved with the INIT message or to retrieve an archived report.

Parameter
Description of Fields
Comments
Default
Parm1
<1> Report Name

An @vm-delimited list of filenames.

Reports saved using the OIPI format should include the full path.

Reports saved using the ARCHIVE message need only the report name.
""
<2> Archive.Boolean. If true will load the report from the ARCHIVE."" (False)

*The following example shows how to use the LOADDOC message to retrieve a

*previously created report or Archived report.*/

 

* Create report and save as c:\savefile\smpreport.rpt

 

declare function Set_Printer

 

* Create a saved OIPI Report

File = "Sample":@fm:"":@fm:10:@fm:"c:\savefile\smpreport.rpt"

stat = Set_Printer("INIT",FILE,"","","",2) ;* Start printing

text = "This is a test line" stat = Set_Printer("TEXT", text)

stat = Set_Printer("TERM")

 

* Create an Archive Report

File = "Sample":@fm:"":@fm:11:@fm:"smpreport"

stat = Set_Printer("INIT",FILE,"","","",2) ;* Start printing

text = "This is a test line" stat = Set_Printer("TEXT", text)

stat = Set_Printer("TERM")

 

 

*Load report - Only valid if originally saved.

 

stat = Set_Printer("INIT","","","","",2)

stat = Set_Printer("Loaddoc","C:\savefile\smpreport.rpt")

stat = Set_Printer("TERM")

 

*Load from Archive - Only valid if originally Archived

 

stat = Set_Printer("INIT","","","","",2)

stat = Set_Printer("Loaddoc","smpreport",1)

stat = Set_Printer("TERM")  

Example 2  * Create 2 reports and load them into one preview window

 

* Create a saved OIPI Report

file = "Sample":@fm:"":@fm:10:@fm:"c:\savefile\smpreport.rpt"

stat = Set_Printer("INIT",FILE,"","","",2) ;* Start printing

text = "This is a test line"

stat = Set_Printer("TEXT", text)

stat = Set_Printer("TERM")

 

* Create another saved OIPI Report

file = "Sample":@fm:"":@fm:10:@fm:"c:\savefile\smpreport1.rpt"

stat = Set_Printer("INIT",FILE,"","","",2) ;* Start printing

text = "This is a test line in a separate report!"

stat = Set_Printer("TEXT", text)

stat = Set_Printer("TERM")

 

* Load both reports

stat = Set_Printer("INIT","","","","",2)

reports = "C:\savefile\smpreport.rpt":@vm:"C:\savefile\smpreport1.rpt"

stat = Set_Printer("LOADDOC",reports)

stat = Set_Printer("TERM")
  • guides/programming/programmers_reference_manual/loaddoc_set_printer_message.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1