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

DeviceSettings for default-printer?

edited January 2014 in General
Hallo,

we have some reports that are printed on labels. These labels need a
specific setting in the printer settings (longer heat time so that the
color stays on the paper).

The device specific settings have been defined by
PrinterSetup.DeviceSettings but the printer name for that report is set
to "default". Is it better to define the correct printer name instead of
"default" when using DeviceSettings?

What happens if that report should be printed on another computer? Are
the Device settings mapped to another printer in some way? - I guess
not. Our users may have different printer drivers installed to access
the same printer from different computers.

What is needed when the device settings are saved in the report? Does
the user need the same printer driver installed as at design time of the
report? Does the user need the _exact_ version of the printer driver?

Thanks in advance,
Ralf

Comments

  • edited January 2014
    Ralf,

    I recommend using DeviceSettings with a specific PrinterName, not 'Default'.

    Using Printer A's DevMode to configure Printer B will provide unexpected
    results. I doubt the version of the printer driver would matter, but it
    could.

    The DeviceSettings = Windows DevMode, which is a memory structure used to
    get/set the printer driver configuration. Win API defines a common set of
    fields - RB exposes these as PrinterSetup properties. The total size of the
    DevMode is defined by the printer driver and can contain printer specific
    configuration. I've never seen a single printer document its custom fields,
    so we came up with the solution of displaying the printer's property dialog
    and saving/loading the DevMode (DeviceSettings).


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2014
    Am 30.01.2014 17:45, schrieb Nard Moseley (Digital Metaphors):

    Hi Nard,

    Thanks for the information (that was what i recommended to the user but
    i wanted to be sure that i was right)

    Ciao,
    Ralf
  • edited February 2014
    Hello Nard,

    Meanwhile i have dicovered more details about the problems our customer
    has with the device settings:

    - The report has 3 sub reports
    - The first subreport prints on normal paper
    - The second subreport prints on special paper that needs
    a longer heat period (which is defined be selecting
    the paper type in the device settings)
    - The third subreport again prints on normal paper

    We have set up all parameters as you recommended: using a specific
    printer name and the printer-native device settings.
    "SaveDeviceSettings" is true for all "PrinterSetup" objects in the report.

    There is one part of the program that reads the report and prints only
    the second subreport and it IS printed with the correct paper type (the
    heat period is long enough)

    Another part of the program prints all subreports together. The second
    subreport gets printed as if normal paper was selected (the heat period
    is not long enough so the ink may be wiped from the paper). It IS NOT
    printed with the correct paper type.

    It seems that the first subreport overwrites the device dependant
    settings of the second subreport.

    Any idea how we can get around this issue?

    Tomorrow i will try to create a simple example report (hoping to get the
    problem reproduced with a simple report...) that i could send you.

    Ciao,
    Ralf
  • edited February 2014

    Make sure subreport.PrintBehavior is set to pbSection and
    subreport.ParentPrinterSetup is set to False. If that does not solve it,
    then also set subreport.NewPrintJob to True.

    There are some printer settings that cannot be changed during the print job.
    For example orientation and bin can be changed, but collation, copies,
    duplex cannot.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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

    Our customer has set up all according to your directions but the printer
    still uses the wrong paper setting when it prints the subreport that
    needs the special paper setting. (with supreport.NewPrintJob set tu true)

    Any advice? - Could it be an issue with this specific printer? (i think
    they are using a Kyocera printer, will have to ask for the modell)

    Thanks in advance,
    Ralf
  • edited February 2014
    In the original post you stated that when the subreport is printed alone, it
    selects the correct paper type. This indicates RB can use the DeviceSettings
    to configure the printer correctly.

    I performed a simple test IIhere and did not encounter any issues. I
    recommend you duplicate the test on your machine.

    I created a main report with a single label, added a subreport to the detail
    band, set

    PrintBehavior to pbSection
    ParentPrinterSetup False
    NewPrintJob True

    For the subreport layout I used a single label
    I configured the child report DeviceSettings to use a different Media Type
    (Glossy Photo Paper).

    I used the Windows Printer Panel to access the Printer's Print Queue and set
    it to Pause Printing, so that the print jobs will stay in the queue.

    When I print, I get two page reports in the print queue. I can double-click
    on the print job and check the printer settings. One of them is to print to
    Glossy Photo Paper.

    I used RB 15.02 for my testing and a Lexmark Pro 200 printer driver.



    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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