fakhri Posted September 14, 2011 Posted September 14, 2011 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 ? Quote
ibandyop Posted September 16, 2011 Posted September 16, 2011 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. Quote
fakhri Posted September 19, 2011 Author Posted September 19, 2011 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 ? Quote
andersa@ellenshoej.dk Posted September 19, 2011 Posted September 19, 2011 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. Quote
fakhri Posted September 24, 2011 Author Posted September 24, 2011 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 ? Quote
andersa@ellenshoej.dk Posted September 30, 2011 Posted September 30, 2011 Not really. As I said I have had pretty much universally negative experiences with designed reports in Rave Reports. Frequent crashes and access violations. I would not use them. Quote
Administrators Farshad Mohajeri Posted October 12, 2011 Administrators Posted October 12, 2011 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.