problem with Report.PrintOptions.ShowDialog

tcmtcm
edited 11:44AM in FastReport 3.0
Hello,

I have a question:

The code below does work correctly. But when I Enable the first line of this code (that is remarkt in this example) it does not work anymore.

What I want to do, is the following:

I have some reports (invoices) that I will print after each other.
When the first line is enabled, fastreport will ask me for every page where I want to print it (the printerdialog) when I activate the first line, fastreport will not ask me anything, fill the preview (as expected) and does not print.

In the variable: prn is '\\mischa\printer1'

I hope you can help me, because this is the last problem I have in my software, and it has to work tomorrow morning on the 1st of februari.

// DmMain.rptFilters.PrintOptions.ShowDialog := False;
while not EOF do
begin
ShowInvoice;
DmMain.rptFilters.Preview := Nil;
DmMain.rptFilters.PrintOptions.Printer := prn;
DmMain.rptFilters.Print;
DmMain.rptFilters.Preview := frxPreView;

Thanks in advance for you reply, and best regards,


Mischa E.J. Hoogendoorn

Comments

  • edited 11:44AM
    this line should be here:

    ...
    DmMain.rptFilters.PrintOptions.ShowDialog := False;
    DmMain.rptFilters.PrintOptions.Printer := prn;
    ...

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.