Jump to content

Recommended Posts

Posted

Hi

 

I used below function ,but don't  fixed.

procedure TMainForm.PrintRpt(FileName: String);
begin
  frxReport1.LoadFromFile(FileName);
  Form_Print.frxReport1:=frxReport1;
  Form_Print.PrepareAndShow(Form_Print.frxReport1,Form_Print.frxPDFExport1);
  Form_Print.ShowModal;
end;

and this 

procedure TMainForm.PrintRpt(FileName: String);
begin
  frxReport1.LoadFromFile(FileName);
  Form_Print.frxReport1:=frxReport1;
  Form_Print.PrepareAndShow(Form_Print.frxReport1,Form_Print.frxPDFExport1);
end;

 all of them,in stand alone work.

 

 

 

Best Regards.

Posted

As commente in  this forum, the problem is the order of doing tings:

 

 

I do like this, and works in isapi without any problem:

 

procedure Tlibr.report(xr: string);
var
   rpt: TfrxReport;
   exp: TfrxPDFExport;
   xreport: string;
begin
   xreport := 'test.pdf';
   
   exp := TfrxPDFExport.create(self);
   rpt := TfrxReport.Create(self);

   rpt.Clear;
   rpt.EngineOptions.DestroyForms := False;
   rpt.EngineOptions.SilentMode := True;
   rpt.EngineOptions.UseGlobalDataSetList := False;
   rpt.EngineOptions.EnableThreadSafe := True;
   rpt.PrintOptions.ShowDialog := False;
   rpt.PreviewOptions.AllowEdit := False;
   rpt.ShowProgress := False;

   exp.ShowDialog := False;
   exp.ShowProgress := False;
   exp.OverwritePrompt := False;
   exp.Background := True;
   exp.EmbeddedFonts := True;
   exp.FileName := UniServerModule.StartPath + 'files\tmp\' + xreport;
   exp.DefaultPath := '';

   rpt.LoadFromFile(UniServerModule.StartPath +'rep\' + xr);

   rpt.PrepareReport;
   rpt.Export(exp);

   UniSession.SendFile(UniServerModule.StartPath + 'files\tmp\' + xreport,xreport);
end;
 

 

Hope this help you.

  • Administrators
Posted

Hi

 

 

The Report that attached in Test Case,is very simple.I write in it Hello UniGui.

But I have above problem.

 

 

Best Regards.

 

Can you test your report with one of our FastReport demos?

 

Can you reproduce them in our FR demos as well?

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...