Jump to content

Rave Report PDF


fakhri

Recommended Posts

Hii,i am trying to output report as PDF using rave report,i'm use this code :

 

 

RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav';

 

RvProject1.SetParam('tgl1',DateToStr(UniDateTimePicker1.DateTime));

RvProject1.SetParam('tgl2',DateToStr(UniDateTimePicker2.DateTime));

 

RvSystem1.DefaultDest := rdFile;

RvSystem1.DoNativeOutput := false;

RvSystem1.RenderObject := RvRenderPDF1;

 

rptfile := FormatDateTime('ddMMyy',UniDateTimePicker1.DateTime)+'-sampai- '+FormatDateTime('ddMMyy',UniDateTimePicker2.DateTime);

 

RvSystem1.OutputFileName := UniServerModule.LocalCachePath+ rptfile +'.pdf';

UniURLFrame1.URL := UniServerModule.LocalCacheURL + rptfile+'.pdf';

RvProject1.ExecuteReport('Report1');

 

but the code line : RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav'; is not executed properly and raise ajax error "server unavailable",so the report output can't be done. is there any solution for this ?

Link to comment
Share on other sites

Browsers do not display .pdf files. Except for Chrome all of them need a plugin to 'display' the pdf.

 

I think the correct way to handle this is to Generate the pdf and save it to

RvSystem1.OutputFileName := UniServerModule.LocalCachePath+ rptfile +'.pdf';

 

And display a properly formatted URL/l to the generated PDF like <a href="http://path/to/pdf"> Download PDF</a> in your UniURLFrame or even a TUniLabel.

Link to comment
Share on other sites

Browsers do not display .pdf files. Except for Chrome all of them need a plugin to 'display' the pdf.

 

I think the correct way to handle this is to Generate the pdf and save it to

RvSystem1.OutputFileName := UniServerModule.LocalCachePath+ rptfile +'.pdf';

 

And display a properly formatted URL/l to the generated PDF like <a href="http://path/to/pdf"> Download PDF</a> in your UniURLFrame or even a TUniLabel.

 

thanks for your reply,but it's still same,any more solution ?

Link to comment
Share on other sites

Hii,i am trying to output report as PDF using rave report,i'm use this code :

 

 

RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav';

 

...

 

but the code line : RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav'; is not executed properly and raise ajax error "server unavailable",so the report output can't be done. is there any solution for this ?

 

Sounds like the session crashes when you load the project file. I have little experience with Rave Reports. Are you using a designed report (not code-based)? I have heard from several places that the designed reports are very error prone and that was also my own experience with them.

Link to comment
Share on other sites

Sounds like the session crashes when you load the project file. I have little experience with Rave Reports. Are you using a designed report (not code-based)? I have heard from several places that the designed reports are very error prone and that was also my own experience with them.

yes Anders, i am using designed report , any suggestion ?

Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators

Hii,i am trying to output report as PDF using rave report,i'm use this code :

 

 

RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav';

 

 

but the code line : RvProject1.ProjectFile := UniServerModule.StartPath+'repot.rav'; is not executed properly and raise ajax error "server unavailable",so the report output can't be done. is there any solution for this ?

 

Have you debugged this line? What happens when above line is executed? It seems that it completely crashes the server.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...