Jump to content

Recommended Posts

Posted

Hi 

 

I would like to use FastReport, however, it is not working for me. If I try to run the report from the main Form, it opens a blank page. If I place the same report in another form, it shows the form but also create a empty form. Following an example of the code I try to use.I would appreciate your help.

 

    frxReport1.ShowProgress := False;
    frxReport1.PrintOptions.ShowDialog := False;
    frxReport1.EngineOptions.SilentMode := True;
    frxReport1.EngineOptions.EnableThreadSafe := True;
    frxReport1.EngineOptions.DestroyForms := False;
    frxReport1.EngineOptions.UseGlobalDataSetList := False;
    frxReport1.ShowReport;
 
 
Thanks 
MM
Posted
  fn := 'inv_'+ qyinv.FieldByName('inv_no').AsString+'_'+FormatDateTime('yyMMddhhmmss.zzz', Now()) + '.pdf';

  frxReport1.PrintOptions.ShowDialog := false;

  frxReport1.ShowProgress := false;

  frxReport1.PrintOptions.ShowDialog := false;

  frxReport1.EngineOptions.SilentMode := True;

  frxPDFExport1.Background := True;

  frxPDFExport1.ShowProgress := false;

  frxPDFExport1.ShowDialog := false;

  frxPDFExport1.FileName := UniServerModule.LocalCachePath +fn;

  frxPDFExport1.DefaultPath := '';

  frxReport1.LoadFromFile(UniServerModule.StartPath + 'files\inv_s.fr3')

  frxReport1.PrepareReport();

  frxReport1.Export(frxPDFExport1);

  FormUrlView1 := TFormUrlView.Create(UniApplication);

  FormUrlView1.URLFrame.URL := UniServerModule.LocalCacheURL + fn;

  FormUrlView1.Show;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...