Thursday 24 September 2009

Open OIPI report previews maximised



A couple of times recently, I have been asked how to launch the OIPI preview window maximised. I therefore thought it worthwhile to remind everyone that the INIT Set_Printer Message can be used to achieve how the window launches, amongst several other things.



There are nine main parameters, the 5th parameter handling how OIPI launches and what is displayed. The 5th parameters ‘Style’ setting consists of 6 options that you can define in your report. The options are:

  • 0 = Print to printer
  • 1 = Display PrintSetup
  • 2 = Preview normal
  • 3 = Maximized
  • 4 = Last location
  • 5 = Specific location
  • 99 = Print to printer with the WMF fix

To launch OIPI maximised you would use something like -
stat = Set_Printer("INIT", "Report 1", title, "", 1, 3)

The INIT message must be called before any printing can start as it controls the initial properties for each printing session. A full list of the properties can be found within the OpenInsight help files, by running a search for “INIT Set_Printer Message” and the help file contain a lot of useful additional information with regards to the INIT Set_Printer Message.

No comments:

Post a Comment