Jump to content
uniGUI Discussion Forums
Sign in to follow this  
A.Soltani

Problem In FastReport Convert To ISAPI

Recommended Posts

Hi

 

My Test case ,work when in stand alone

and show my sample report.

But when i convert it to ISAPI ,the report don't show.

 

 

 

Best Regards.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi

 

 

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

But I have above problem.

 

 

Best Regards.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×