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

Default printer is a POS printer and report print 6000 pages

edited August 2003 in General
My application is a POS The default printer is a POS printer Tmu200 or a
thermal printer . If I try to print a report with the default printer as the
Tmu200 (epson) on a inkjet printer the report goes wild and report that it
will print 6000 pages. The preview always show the right information but
when I choose the printer the report print lots of blank pages. If I change
the default printer to an inkjet the it will print well even on the POS
printer.
I seen others reply that relate this problems with the margins. Need
recommendations.
D6 RB=dclRB66.dpl
Carlos

Comments

  • edited August 2003
    Hi Carlos,

    Yes, this is probably related to the margins you have set for your report.
    When ReportBuilder generates a report, it uses the printer driver to
    determine how much space it has to print a page. If the margins of the
    report are outside the printable area of the printer, ReportBuilder will try
    to overflow to the next page essentially printing infinite pages. Try to
    find out the printable area of your POS printer and change the margins of
    your report accordingly.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    I want to give the option to change the default printer prior of generating
    the report.
    How can I do it?

    Carlos
  • edited August 2003
    Hi Carlos,

    There is no built in way to change the default printer in Delphi. Depending
    on which Operating System you are using, you may have to chang the Win.ini
    file along with the registry. Starting with Windows NT, all default printer
    information is found in the registry. I did a quick search in the Google
    groups and found numerous articles of others trying to change the default
    printer as well. This would probably be a good place to start looking for
    example code to do this.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    I tried to use this command an get a av error
    ppreprot1.printdialog.showmodal.

    Is there a way where I can replace the driver RB is going to use prior to
    the generation of the report?

  • edited August 2003
    Hi Carlos,

    The reason you are receiving an AV error is that you are trying to display
    the print dialog before it has been created. You will need to create a new
    print dialog and access its properties after that. Once you create the
    TppPrintDialog, you will have access to the printer and be able to change
    the default printer displayed in the dialog.

    --
    Best Regards,

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