ShowDialog only once?

edited 6:51AM 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 6:51AM
    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