Jump to content

Rave Report PDF


fakhri
 Share

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

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.

 Share

×
×
  • Create New...