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

Report Scaling

edited January 2005 in General
Hi Guys,

I have a large RB7.0.4 report that was designed with screen pixels (768
horizontal - no idea if this is part of the problem or not). When
printing this little monster, I first discovered that it kept printing
with landscape orientation. I finally figured out that it (possibly the
printer?) seems to automatically rotate when the page is wider than the
printable margins.

On the preview form though, the report displays perfectly - the full
width of the report is visible, scaled to fit within the specified
margins. When I print though, the report does not scale to fit within
the margins - instead it seems to add the border (non-printable width)
to the specified margin which causes the right-edge of the report to
spill off the page - or to cause the page to rotate.

I have simulated the problem like this:
1. Create new report with units set to screen pixels.
2. Add a single shape (or anything else whose extent is easily
distinguishable) to one of the bands, and stretch it to fill the width
of the report. Don't let it stretch with parent though, just make it
fill the width.
3. Preview - this works perfectly.
4. Print - the right edge is cut off, or the page gets rotated.

The report is rather huge - not zillions of records, but literally
thirty-odd sub reports - and I would spend days in mourning if I had to
go and manually adjust the layout of each band to make it fit. Certainly
there must be a way to adjust the way a report scales on the printer?

Regards,

Cobus Kruger

Comments

  • edited January 2005
    Hi Cobus,

    There is no scaling done when printing a report to a printer. The
    measurements you define are taken literally and transferred to the printer
    driver.

    When ReportBuilder begins generating a report it creates draw dommand
    components to represent every component on your report. These draw command
    components essentially contain all the necessary information to draw the
    report object to the device canvas (Screen, Printer, PDF...etc.). All
    measurements in a draw command are in thousandths of millimeters, or
    microns, to ensure the highest precision regardless the device. Next each
    draw command is sent to the device object (in your case the Printer Device)
    where the measurements are converted to the device specific units (printer
    pixels), then outputed using Windows API functions. In the case of the
    printer, ReportBuilder is sending the measurements of an object in printer
    pixels to the printer driver which is then printing the objects at that
    location on paper.

    Most printers define an un-printable area which usually exists within .25
    inches of the paper edge. If a report object lies in this area, you can see
    many different effects from missing objects to report objects that have been
    cut off. In your case it looks as though your printer is simply changing
    the paper orientation to solve the problem. As a test try setting your
    margins to a larger number and see if that helps.



    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.