Printing in black and white

Hi there,

I use Delphi 7 and FR 4.9.102


One of our customers has the following strange problem.


He uses Windows XP and a HP C1215 Color-Laserjet printer. Newest drivers and newest firmware.
He starts our Application and makes a preview with FR. From preview he prints. All okay.
But each following printout is black and white, no colors anymore. Only if before printing he starts the printer-setup dialog (no changes, only press "OK") he gets colours again.

He has no problems with any other applications.


In earlier Version with older FR (4.8.?) it worked fine.

Can You help me ????



Regards
Erik

Comments

  • edited January 2011
    Yes, I have encountered this situation too.
    Regards!
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 5:52PM
    My (wild) guess is that you are somehow destroying the printing options object, and recreating it on your code and that is putting it back to the default values.
    Try to reuse as many objects as you can (starting with the tfrxReport one).
  • edited 5:52PM
    but 4.6.x worked fine.
  • edited 5:52PM
    Yes that??s right.

    In prior Versions all worked fine.


    And I am not doing anything with the printing options.
    I only tell Fastreport the printer on which to print.

    And remember that happens only on this one specific printer (HP C1215 Color-Laserjet).



    @mrzxc
    What printer are you using, when this happens ?



    Regards
    Erik
  • edited 5:52PM
    My printer is HP C1215 Color-Laserjet too. And HP Color laserjet 3600n is ok.
  • edited 5:52PM
    Yes maybe it??s a problem of HP.

    But there are no new drivers for this printer.
    And the support of HP is not so good.


    But the other thing is that earlier Versions of FastReport did well, with this HP model.

    Probably the guys of FastReport could investigate that.



    Regards
    Erik
  • edited 5:52PM
    I solved this problem temporarily.
    frxPrinter.pas
    .......
    procedure TfrxPrinter.EndDoc;
    var
    Saved8087CW: Word;
    begin
    Saved8087CW := Default8087CW;
    Set8087CW($133F);
    try
    Windows.EndDoc(FDC);
    except
    end;
    Set8087CW(Saved8087CW);

    FPrinting := False;
    RecreateDC;
    FBin := -1;
    FDuplex := -1;

    // FMode.dmFields := DM_DEFAULTSOURCE or DM_DUPLEX;//rem this line, It will working fine.
    FMode.dmDefaultSource := FDefBin;
    FMode.dmDuplex := FDefDuplex;

    FDC := ResetDC(FDC, FMode^);
    end;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.