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

Printer preferences and report design resulting in endless printing

edited February 2006 in General
Hi,
i have the following problem
for some reason the printer preferences of a printer driver get reset or
modified
i do not now what process is responsable for this
anyway when loading the rtm from a database and after setting the printer to
use in the report component the paper size of the design gets screwed
so the report prints but since the data to be printed doesn't match the
heigth of the paper dimensions, RB keeps printing
after all this happens i can see that the printer driver preferences are
changed
does RB change the driver settings?
does RB change it's paper settings according to the driver preferences?
i'm completely in the dark on what is happening here...
this is with RB9.03

tia,
Marc Antheunis

Comments

  • edited February 2006

    When you run a report, the Report.PrinterSetup properties are used to print
    the report. The properties are applied to the printer driver's DevMode
    structure. (The DevMode is a Windows structure used to configure the printer
    driver).

    Report.PrinterSetup --> windows DevMode structure ---> printer driver

    The Report.PrinterSetup properties are saved as part of the report
    definition (.rtm). The idea is the you design a report for a specific paper
    size, margins, etc.

    At design-time you can use the File | PageSetup dialog to specify the
    PrinterSetup properties. Or you can use the object inspector to specify the
    Report.PrinterSetup properties.

    At runtime you can programmatically set the Report.PrinterSetup properties -
    prior to calling Report.Print.







    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    hi Nard,
    hmmm
    am i correct in concluding that setting the printer in a ppreport can not
    change the printer document prefence settings?

    this is what happens:
    * we have specific designed reports with specific document length and width
    saved in the database
    * we set the printer preferences according to this designed report (it's an
    epson label printer)
    * when the report gets streamed in we set the printer driver name (cause
    this changes sometimes) in the printername property
    * report.print

    for some reason the document width and heigth get altered and strangely the
    printer preferences reflect these changes
    furthermore in the event log there are events 20 logged saying that the
    printer drivers are changed
    i didn't see this behaviour with 9.01
    i tend to believe these problems started when switching to 9.03, but then
    again some windows updates were introduced at the same time
    does all this makes sence or not?
    tia,
    marc

  • edited February 2006

    Nothing related to the printer changed with RB 9.x. The printer unit is
    stable and works as designed. It has been stable for many releases now.

    On the other hand, printer drivers are often quite buggy. Always update to
    the latest printer driver and try testing with different printers.

    When you load a report, the PrinterSetup properties that are saved as part
    of the report definition are going to be used to configure the DevMode for
    the print job. (Note that this will not permanently alter the windows
    default printer settings for the printer. Each print job has its copy of the
    DevMode structure).

    I might not be explaining this correctly but I think it makes sense. Lets
    say you have designed 2 reports.

    1. Report 1 is designed to always print on A4 paper, Landscape, Duplexed.
    2. Report 2 is designed to print on Legal paper, Portrait, no duplex.
    3. I have an Epson driver installed and configure the default settings to be
    Letter, Portrait, no duplexing

    When I print these reports, the print job configures the DevMode to print
    the report to using the settings that I specified when I designed it.

    But after printing the above reports, I can goto to my windows printer panel
    and see that the default settings are still the same: Letter, Portrait, no
    duplex.




    The report printersetup properties are used to configure the printer DevMode
    as I described before. This does not permanently alter the default settings
    for the printer. It more like when you print, you have your own copy of the
    DevMode. The Printer thread of the Tech Tips newsgroup contains an article
    titled Windows Default Printer Settings that explains how to use RB to get
    the default printer properties.











    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    Hi Nard,

    that is exactly what i expect that the behaviour is...
    we never had any problems up till now, so neither the design of the report
    nor the drivers are changed in the problematic environments

    now what i discovered at this time is that apparently the design of the
    report swithes measurement units, it changes from the designed mm to inches
    what results in a paper size that the printer does not recognises and thus
    the printing is wrong
    at this point i have no idea why mm is changed in inches
    so the battle continuous
    thx,
    marc


  • edited February 2006
    Nard,
    it pops to my mind that maybe Multilizer is the culprit
    are there any known issues between ML and RB, since ML changes the locale
    settings and tries to translate reports?
    tia,
    marc

  • edited February 2006

    We do not have info or experience with using Multilizer. I would create a
    test with and without it and compare the results.

    Internally RB stores measurements in mm thousandths (microns). You can see
    this if you peform a view as text on the report form or save the .rtm as
    ascii text. Based upon the Report.Units value, RB converts the measurements.
    I think the Windows API requires the paper size to be specified in mm tenths
    (open ppPrintr.pas and search for MMTenths).




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    Hi Nard,

    is there a way that by assigning a rtm file to a report component that the
    paper size gets altered
    cause this is what i see happening with the client
    or can it be that the report changes paper size according to the driver
    settings?
    still stuck here
    anyway i do see some windows event loggings stating that the driver settings
    are changed (event 20)
    i find multiple entries of that, does this rings a bell??

    tia,
    marc


  • edited February 2006

    When a report definition is saved to .rtm or database, all of the TppReport
    published properties are saved as part of the report definition - this
    includes the Report.PrinterSetup properties.

    Example:

    1. I create a TppReport, set paper size to A4 and save to .rtm file.

    2. I set TppReport paper size to Letter.

    3. I load the .rtm file defined in number 1.

    4. TppReport paper size is now A4







    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    hi Nard,

    that's how it is supposed to be yes...
    and that's how it is except in the offending report
    the reason is totally unclear
    problem is that the page setting that is being taken is less in height then
    the design of the report
    when you have this situation then the report gets printed over and over
    again, it just keeps on printing
    that is one scenario that isn't described in the tech-tips to solve
    continuous printing
    this behaviour can be triggered
    it must be something i don't see right now, in the case i find the problem
    i'll certainly keep you posted
    cu
    marc

  • edited February 2006
    Nard,

    the streamed in rtm file when printed changes its page layout settings
    it is in fact the width of the papersize that gets smaller (also the length
    but that was lang enough to deal with the memo placed on the report)
    but since the width wasn't sufficient i got the endless printing thingy
    after killing the app and then opening the rtm file and switching back and
    forth between designer and preview i saw that the page layout settings were
    getting altered...
    so the question is how this is possible?
    tia,
    marc


  • edited February 2006
    - Check whether you have any code associated with the report that might be
    modifying the layout.

    - If you have subreports, check the subreport.report printeterseup props.
    From the report designer you can check this by selecting the workspace for
    the subreport - this will select the childreport in the object inspector.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2006
    negative on both questions
    the design gets streamed in and the printer name is being set in the report
    component, thats all...
    it is though not a normal printer, it's an epson label printer
    so maybe the driver used is being faulty
    problem is that this issue isn't reproducable, not even on the sites where
    it occurs...
    i'll have to keep digging...
    tia,
    marc

This discussion has been closed.