Omnis Technical Note TNPR0002

The Job Setup Dialog

For Omnis Studio version 1.2
By Michael Monschau

The job setup dialog behavior. How to open it and how to save job setup data with a report.

Contents

Prompting for Job Setup

Saving job setup with report
Printing from disk or memory

Prompting for Job Setup

Traditionally the job setup dialog only existed for the Macintosh platform. In version 1.2 it exists on all platforms. The job setup dialog allows you to pick things like output trays, the pages to be printed etc.
The commands 'Print report' and 'Prepare for print' have an option to prompt for job setup. Until 1.2 there was no way to prompt for job setup if the notation was used to print a report. What's more, unless the report destination is the Printer, the job setup dialog will not appear.

Both issues have been addressed for 1.2. A report instance has a new notational method $openjobsetup() which allows you to prompt for the job setup once you have created a report instance.
If you specify kTrue as the parameter to $openjobsetup, the job dialog will be opened regardless of the destination.

The job setup dialog can only be opened once a report instance has been created and prior to the first print record. It can be during construction or immediately after.

The following example code implements the prompting of the job setup in the construct of the report.

##### Method '$construct' #####
No.  Parameter      Type    Subtype  Init.Val/Calc
1    pPrompt        Boolean
No.  Local Variable Type    Subtype  Init.Val/Calc
1    ok             Boolean
No.  Method text
1    If pPrompt
2     Do $cinst.$openjobsetup(kTrue) Returns ok
3     If not(ok) ;; the user has canceled, close the instance and quit
4       Do $cinst.$close()
5       Quit method
6     End If
7   End If

Saving job setup with report

If the job setup dialog is opened when printing to either the disk or memory report destination, all
information set in the job setup dialog will be saved with the report. However, the job setup information
is not cross platform so the report must be printed on the same platform if the job setup information
is to be used.


Printing from disk or memory
In version 1.2 the commands 'Print report from disk' and 'Print report from memory' do not have an
option to prompt for job setup. This may be a problem to some people and will be rectified in the next version of Omnis Studio.


Download RTF Document

Search Omnis Developer Resources

 

Hit enter to search

X