Omnis Technical Note TNPR0003

Printing ranges of pages

For Omnis Studio version 1.2
By Michael Monschau

What goes on when specifying ranges of pages?

Contents

Printing and ejecting
Page ranges and devices (The screen report field and Possible ranges)


Printing and ejecting

When specifying a range of pages, only the ejection of pages is effected. The report engine and print manager will generate all pages of the report as normal. These pages are buffered on disk until the last page of the report is completed. Only then are the specified pages ejected. Even calling $ejectpage from notation will have no effect until the print job is finished.

This is different to when no page ranges are specified (all pages are to be ejected). The print manager
will eject pages as soon as they are complete if auto ejection is enabled.

Page ranges and devices

Some devices (report destinations) do NOT support page ranges. These devices will always print or display all pages of a print job. The screen and page preview devices are currently the only devices which do NOT support page ranges. How ever page ranges can be specified in the job setup dialog
when printing from a screen report to printer. The screen report field The screen report field implements the $redirect method which can be called to send the report to another device. The $root.$prefs.$pages can be used to specify the range of pages to be redirected.

  ##### Method 'sendToPrinter' #####
  No. Method text
1 Calculate $cdevice as kDevPrinter
2 Calculate $prefs.$pages as "20-1"
3 Do $cobj.$redirect(kFalse)
4 Calculate $prefs.$pages as ""


Page ranges can be specified in the job setup dialog or using the notation $root.$prefs.$pages or
$cinst.$pages where $cinst is a report instance. Here is listing of all possible ways you can specify pages to be printed.

"1,3,5,2,4" Print the specified individual pages in the order they are specified.
"1-10,30-35" Print pages 1 to 10 then print pages 30 to 35.
"o1-10,e1-10" Print all odd pages in range 1 to 10, then print all even pages in range 1 to 10.
"30-1" Print pages 1 to 30 in reverse order.
"C" Print the currently visible page (when using $redirect of the screen report field).

Any combination of the above. If a page appears more then once it will be printed more then once.

Download RTF Document

Search Omnis Developer Resources

 

Hit enter to search

X