printing without the print dialog

edited May 2007 in FastReport 4.0
I have an application that needs to print reports without a preview.

Just calculate, fill in the fields and print.

How is that possible in FastReport.

Report.Prepareport(True); // prepares the report

Report.Print; // called thereafter shows the print dialog even if under PrintOptions I set ShowDialog to False. DOES NOT WORK needs to be set in code ( Report.PrintOptions.Showdialog := False ) before the call to Report.Print

Any help would be appreciated.


after much testing

I have Delphi 6 running under Windows XP.

I have a multipage report (5 pages) of which 1 to 5 pages may be printed out at one time. Generally 4 are printed out.

This is determined by flags in the program. this checked - print page 1, that checked print page 3, etc.

I do not want the Print Preview (ShowReport) as all that is needed is to print the pages directly.

When I use ShowReport the correct number of pages and their content is displayed properly and when I click on the Print button it all prints as it is supposed to.

When I use PrepareReport and Print (with PrintOptions.ShowDialog := True), it all prints properly.

When I use PrepareReport and Print (with PrintOptions.ShowDialog := False), when I choose to print only one page it prints ok (1 to 5) when I choose to print any two pages (1 to 5) they print ok, but any more than that, only the first page is printed and a series of exceptions kills the printing process.

I don't have source so it is a little difficult for me to find out what the problem is.

Can you please help me?

Thanks

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:25AM
    what do you mean by multi page, multi design pages or multi output.
    typical code
    procedure TForm1.Button4Click(Sender: TObject);

    begin
    frxReport2.LoadFromFile('Endlos.fr3');
    frxReport2.PrepareReport;
    frxreport2.PrintOptions.ShowDialog := false;
    frxreport2.PrintOptions.PageNumbers:= '2,3';
    // string value can be output pagenumbers sep by commas or a range '3..5'
    frxReport2.Print;

    end;
    since you are getting exceptions after more than 5 pages are you working with trial version, it is limited to 5 output pages.

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.