Jump to content


Photo

Problem In FastReport Convert To ISAPI

FastReport

  • Please log in to reply
5 replies to this topic

#1 A.Soltani

A.Soltani

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 82 posts
  • LocationTehran-Iran

Posted 05 November 2017 - 02:44 PM

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.


  • 0

#2 A.Soltani

A.Soltani

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 82 posts
  • LocationTehran-Iran

Posted 05 November 2017 - 02:51 PM

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.


  • 0

#3 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 08 November 2017 - 08:23 PM

Hi

I remember that I recomended you to start with a blank report and see if it occurs with a blank report too.

Sent from my SM-N900 using Tapatalk
  • 0

#4 A.Soltani

A.Soltani

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 82 posts
  • LocationTehran-Iran

Posted 09 November 2017 - 04:44 PM

Hi

 

 

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

But I have above problem.

 

 

Best Regards.


  • 0

#5 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 675 posts

Posted 14 November 2017 - 01:31 PM

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.


  • 0

#6 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9815 posts

Posted 15 November 2017 - 11:12 AM

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?


  • 0





Also tagged with one or more of these keywords: FastReport

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users