ShowDialog only once?

edited 5:19AM in FastReport 4.0

Hello,

Many times I need to print out a whole dataset. For example a customer table and every customer would be a separate job.

It is very annoying that in case of 100 customers the Showdialog will show up 100 times.

This is the code I use. Can I show the print dialog at once, and then all the frxReport.prints will use it?


frxReport.PrintOptions.ShowDialog := True;

while not InputDataSet.Eof do
Begin

// some processing here


frxReport.PrepareReport;

frxReport.print;


InputDataSet.Next;
End; // while not InputDataSet.Eof do

Comments

  • gpigpi
    edited August 2011
    Try
    frxReport.PrintOptions.ShowDialog := True;
    
    while not InputDataSet.Eof do
    Begin
    
    // some processing here
    
    
    frxReport.PrepareReport;
    
    frxReport.print;
    
    if frxReport.PrintOptions.ShowDialog then frxReport.PrintOptions.ShowDialog := False;
    InputDataSet.Next;
    End; // while not InputDataSet.Eof do
    
  • edited 5:19AM
    gpi wrote: »
    Try
    frxReport.PrintOptions.ShowDialog := True;
    
    while not InputDataSet.Eof do
    Begin
    
    // some processing here
    
    
    frxReport.PrepareReport;
    
    frxReport.print;
    
    if frxReport.PrintOptions.ShowDialog then frxReport.PrintOptions.ShowDialog := False;
    InputDataSet.Next;
    End; // while not InputDataSet.Eof do
    

    Thank you, I will try it.

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.