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

papername question

edited April 2004 in General
I changed the report papersize by this code:
pplist.PrinterSetup.PaperName:='Fanfold 12.00 x 8.50 in';

This works under my pc, but not in my client pc (the page size cannot be set
to 12 inch). Finally I find out my client pc's printer doesn't have the
papername of 'Fanfold 12.00 x 8.50 in'. So I queries my setting failed for
this reason. Finally I code by these codes:
pplist.PrinterSetup.PaperName:='Custom';
pplist.PrinterSetup.PaperHeight:=12;
This works under my pc and my client pc.

Question:
1. Why setting the papername to 'Fanfold 12.00 x 8.50 in' worked in my pc
and may not work in other pcs?
2. If the papername is not found in the running pc, what RB will do?
3. How I can guarantee that my papername used in my program is valid for all
pc?

Benson Wong
D5, RB6.03, Win2000

Comments

  • edited April 2004

    Printer drivers typically have their own set of paper names.

    Set the PrinterSetup.PaperWidth and PaperHeight. Then ReportBuilder will
    find the correct paper name for the currently selected printer.

    The Report.PrinterSet.PaperNames[] array contains the list of valid paper
    names for the currently selected printer. There is a corresponding
    PaperWidths[] and PaperHeights[] array.



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.