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

Problem with HPLaserjet 2200 DTN

edited July 2001 in General
Hi all,

can someone give me a clue, please.

I have troubles with the 3 paperbins regarding the HP Laserjet 2200 DTN
with the latest printerdriver 040201 installed.

First of all. Demo dm121 works.

but the techtip

procedure TForm1.ppReport1StartPage(Sender: TObject);
var
lsBinName: string;
begin
if ppReport1.AbsolutePageNo = 1 then
lsBinName := ppReport1.PrinterSetup.BinNames[0] // is 'Fach 1' =>
'Tray 1'
else if ppReport1.AbsolutePageNo = 2 then
lsBinName := ppReport1.PrinterSetup.BinNames[1] // is 'Fach 2' =>
'Tray 2'
else
lsBinName := ppReport1.PrinterSetup.BinNames[2]; // is 'Fach 3' =>
'Tray3'

ppReport1.Engine.Page.PrinterSetup.BinName := lsBinName;
end;

failed.

I worked out what happens.

Within the printer properties there are two special settings:

1. First Page -- This is set on Tray 2
2. Rest Pages -- This is set on Tray 3

Regarding at 1 I can achive to adress the printer what I want to do, but
not regarding at 2.

In the above example the printer uses Tray 1 for the first page and for the
rest
of the pages Tray 3. Tray 2 is ignored.

If I change the special settings:

1. dito
2. Rest Pages to Tray 2 or Tray 1 then I get the results (Tray 1, Tray 2,
Tray2) or (Tray1, Tray1, Tray1).

So my question is pretty simple. How can I recover the "sovereignty" over
the printer?

Thanks

Martin Cremer

Comments

  • edited July 2001


    - Download the latest version of the printer driver.

    - Check that you are setting ppReport1.Engine.Page.PrinterSetup.BinName

    - Check that you are using the latest version o RB, 5.56.


    ReportBuilder communicates indirectly with the printer driver
    software via the Windows API

    ReportBuilder <--> Windows API <----> Printer Driver

    Changing the Bin is working with other printer drivers.

    2. The Windows API has something called a DevMode structure that is used
    to setup the printer. Lookup DevMode in the MS SDK help file (which is
    included with Delphi).

    3. If you want to trace or read the RB source code that handles this,
    check out RBuilder\Source\ppPrintr.pas. Methods to look at:
    CustomPrinter.StartPage, CustomPrinter.ResetDC and
    Printer.PrinterSetupToDevMode. Essentially what happens is the at the
    start of each page, RB calls Windows.ResetDC passing it the latest copy
    of its DevMode structure.






    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2001
    Hi Nard,

    thanks for your answer. But I can not see what you suggest.

    1. I did download the latest printer driver dated from 04/02/2001.
    2. I used the tech tip as you can see below.
    ppReport1.Engine.Page.PrinterSetup.BinName := lsBinName is set.
    3. I use RB 5.56.

    So, do you think that the latest HP printer driver is buggy and there is no
    change to fix it or do you want me to change the RB's code in the file
    RBuilder\Source\ppPrintr.pas?

    By the way there is no problem with other HP printers (HP Laserjet 5 or
    Lexmark), but with the Laserjet 2200.


    Thanks

    Martin Cremer



  • edited July 2001
    Hi Nard,

    I forgot to mention that I use W2K.

    Searching Tamaracka for paper bins my suspicion is that some printer (HP
    2200) doesn't react on changing paper bins as it is described in the
    tech-tips. But in the printer properties I dicovered a special NT-Formular
    page. Here you are able to assign each bin a special papersize. Is it
    possible in RB to change the bins while changing the papersize?

    Thanks

    Martin Cremer


This discussion has been closed.