How to assign a printer in the code

edited 6:53PM in FastReport 3.0
Hi Guys,

The problem I have is that I need to assign a printer to report at runtime (in the code), but I connot seem to find this anywhere (on this forum or in the manual). I am using delphi 5.

Any help would be appreciated.

Thanx ;)

Isamu

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:53PM
    typically
    frxreport1.PrintOptions.Printer := 'Canon i350';
    the value is a string and must be the same as names shown in the system printers dialog.
    do it after loading a report and before alling show or prepare.
    ;)
  • edited 6:53PM
    Thanx !!!

    It works like a charm ;) Now, how do I print the report 1) Without it asking for a printer in the preview, and 2) Printing straight with no preview.

    Thanx for the help ;)

    Isamu
  • gordkgordk St.Catherines On. Canada.
    edited 6:53PM
    set the various properties of the report component
    call prepare
    call print
    read about the functions and procedures of the report component in the programmer's manual.
    ;)
  • edited 6:53PM
    Thanx a lot !!!

    I was only given the users manual, which doesnt cover meny programming issues ;)

    Thanx for the help !!!

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.