Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Specify paper stock

edited October 2005 in General
I am not sure if this is the right forum for this. So if anyone knows the
right one, a gentle nudge would be appreciated.

I have a report in which each record is several pages long. Each record
consists of a cover page followed by some data pages. Depending on the type
of record, the cover page is supposed to be either white, blue or brown. The
data pages are always white.

The report is intended to be printed. The intention is to export the report
to PDF then send that to our printery. If the PDF file contains paper stock
choice commands then they can print it and alternate the paper stock
correctly. Apparently PDF will support this.

I just don't know how to specify which paper stock each page should be
printed on. Ideally there would be some option in Report Builder which would
let me set this property. It is possible there is none. Can someone please
help me out?

Thanks in advance,
Samuel Allan

Comments

  • edited October 2005
    Hi Samuel,


    This newsgroup is fine. When in doubt, post to General :).

    If you were printing directly from ReportBuilder you could control the bin
    each page of the report is printed to (I assume each bin contains a
    different color paper). ReportBuilder has the ability to communicate with
    the Windows API which in turn communicates with your printer driver to
    control such features. See the article below for more information.

    However, once you export your report to a PDF file, ReportBuilder no longer
    has control over how it is printed (beyond the content of the PDF file). It
    is up to the program you are using to print these PDF files (Acorbat
    perhaps) to define which bin you would like to print to.

    --------------------------------------------
    Tech Tip: Selecting Paper Bins for Each Page
    --------------------------------------------


    Sometimes you may want to print the first page of a report to the
    manual bin and then print the remaining pages to the default bin.

    You can use the Report.OnStartPage event to set the bin for any page.


    Example:

    procedure TForm1.ppReport1OnStartPageEvent(Sender:TObject);
    var
    lsBinName: String;

    begin

    if ppReport1.AbsolutePageNo = 1 then
    lsBinName := ppReport1.PrinterSetup.BinNames[3]
    else
    lsBinName := ppReport1.PrinterSetup.BinNames[1];


    ppReport1.Engine.Page.PrinterSetup.BinName := lsBinName;


    end;



    Note: The above example assumes the manual bin is 4th in the list (remember
    its a 0 based index). To account for different print drivers, you could
    search for the 'manual' bin in code by performing a search on the printer's
    available bin names:

    for liBin := 0 to ppReport1.PrinterSetup.BinNames.Count-1 do
    if Pos('manual', ppReport1.PrinterSetup.BinNames[liBin]) > 0 then
    begin
    lsBinName := ppReport1.PrinterSetup.BinNames[liBin];
    break;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Thanks for that Nico, it will be useful when I have to make the small run
    version of the report.

    According to the printery guys, you can write paper stock and paper tray
    selection commands into the PDF itself. I have yet to confirm this. However,
    I was hoping that as Report Builder has control over the content of the PDF
    file, ReportBuilder might be able to write these commands into the PDF file
    for me.
  • edited October 2005
    Hi Samuel,

    Unfortunately this is not something the PDF device in ReportBuilder
    currently supports.

    You may try looking at one of the third party export suites such as Gnostice
    (www.gnostice.com). I'm not sure if they support this feature or not.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2005
    Thanks for your help Nico. Much appreciated.


This discussion has been closed.