EddyRocha Posted July 21, 2012 Share Posted July 21, 2012 i have a problem with fast report, when i enter the first time the system seems to work fine, but when I close the application and try enter again, the system can't run (show the cursor like charging), only if i restart the apache service i can enter again, but the same happens again, other applications that don't use Fast Report not have this issue... I check the log file, but does not create any messages... i try with quickreport and the log file show me the error: [HttpExtensionProc]:EConvertError : Cannot assign a nil to a TFont Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 21, 2012 Administrators Share Posted July 21, 2012 Visual VCL components can not be used with unigui. You must use non-visual reporting components. Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 23, 2012 Author Share Posted July 23, 2012 now i work with non visual components, the detail that it works fine the first time, send the pdf correctly, but if I try several times, the second time fails or until the fifth, then it does nothing, it is like dataset is disconnected, because I try to change of record and does not work, but does not generate any error in the log... one more thing, if I run the application with the option localhost everything works fine, no matter how many times I try, but if done through the dll on the server is when the problems are generated... I will have to change something in the configuration of apache? ... Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 23, 2012 Administrators Share Posted July 23, 2012 You need to log all steps in your code to see where actually the problem starts. Also look at the error logs. Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 23, 2012 Author Share Posted July 23, 2012 how I can do that? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 23, 2012 Administrators Share Posted July 23, 2012 1) Use UniServerModule.logger.AddLog() function to add all steps in your code to prepare a report 2) Start with a blank report then add your FR controls one by one. Some of the FastReport controls aren't compatible with multi-threading. Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 23, 2012 Author Share Posted July 23, 2012 My Code: UniServerModule.Logger.AddLog('info','1'); frxReport1 := TfrxReport.Create(self); frxPDFExport1 := TfrxPDFExport.Create(self); frxRichObject1 := TfrxRichObject.Create(self); UniServerModule.Logger.AddLog('info',UniMainModule.Ruta+'Contenedores.fr3'); UniServerModule.Logger.AddLog('info','2'); frxReport1.LoadFromFile(UniMainModule.Ruta+'Contenedores.fr3') ; UniServerModule.Logger.AddLog('info','3'); frxReport1.PrintOptions.ShowDialog := False; frxReport1.ShowProgress:=false; frxReport1.PrintOptions.ShowDialog:=false; frxReport1.EngineOptions.SilentMode:=True; UniServerModule.Logger.AddLog('info','4'); and the log: ContenedoresWEB: 00001908: 16:20:24 [info]:1 ContenedoresWEB: 00001908: 16:20:24 [info]:C:\xampp\htdocs\Contenedores.fr3 ContenedoresWEB: 00001908: 16:20:24 [info]:2 ContenedoresWEB: 00001908: 16:20:24 [info]:3 ContenedoresWEB: 00001908: 16:20:24 [info]:4 ContenedoresWEB: 00001908: 16:20:25 [info]:5 ContenedoresWEB: 00001908: 16:20:25 [info]:6 ContenedoresWEB: 00001908: 16:20:25 [info]:7 ContenedoresWEB: 00001908: 16:20:25 [info]:8 ContenedoresWEB: 00001908: 16:20:25 [info]:9 ContenedoresWEB: 00001908: 16:20:25 [info]:10 ContenedoresWEB: 000016D4: 16:20:33 [info]:1 ContenedoresWEB: 000016D4: 16:20:33 [info]:C:\xampp\htdocs\Contenedores.fr3 ContenedoresWEB: 000016D4: 16:20:33 [info]:2 I could see the error is generated in step 2, where the file fr3 is assigned to the component of the report, but I don´t know why ... Quote Link to comment Share on other sites More sharing options...
Ronak Posted July 24, 2012 Share Posted July 24, 2012 I haven't faced any problem with FastReport. Works Fine. I used Datamodule as placeholder for FrxPdfExport, frxRichObject,....... in the MainForm, just create the datamodule FrTools := TDataFrTools.Create(UniApplication); FrxReport component I used to put in Forms. Regards. Quote Link to comment Share on other sites More sharing options...
zilav Posted July 24, 2012 Share Posted July 24, 2012 Try this http://test2012.fast-report.com/pl/faq/13#98 Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 24, 2012 Author Share Posted July 24, 2012 I haven't faced any problem with FastReport. Works Fine. I used Datamodule as placeholder for FrxPdfExport, frxRichObject,....... in the MainForm, just create the datamodule FrTools := TDataFrTools.Create(UniApplication); FrxReport component I used to put in Forms. Regards. in the dll i can't create a in code, because the dll generate automatically the datamodule or forms... when i try this, not compile // dmReporte := TdmReporte.Create(UniApplication); Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 24, 2012 Author Share Posted July 24, 2012 Try this http://test2012.fast-report.com/pl/faq/13#98 you mean this part of the page? frxReport.EngineOptions.EnableThreadSafe := True; frxReport.EngineOptions.DestroyForms := False; remains as before Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 24, 2012 Administrators Share Posted July 24, 2012 As I said before, start with a blank or simple report first and see if this problem persists. Quote Link to comment Share on other sites More sharing options...
EddyRocha Posted July 25, 2012 Author Share Posted July 25, 2012 The problem starts when I add the band master, VCL application that if it works but in the WEB goes down, and modify the report in several ways and does not work on WEB (only the first time), as I mention it only works with the VCL application, which I did for now to give a solution was to create an exe that includes the code of the report, receive parameters and generates a PDF, the web application call the exe, sends parameters and displays the PDF (generated by exe), I don't like but I don't know what else to do... Quote Link to comment Share on other sites More sharing options...
Ronak Posted July 25, 2012 Share Posted July 25, 2012 Attached a working fine, demo for FastReport, No issue with me! D2009 Proj_TestFR.rar Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 25, 2012 Administrators Share Posted July 25, 2012 Band master by itself can't cause this problem. What other components do you put in band master? Quote Link to comment Share on other sites More sharing options...
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.