jahlxx Posted October 22, 2017 Share Posted October 22, 2017 Hi. I've problems with loading reports dynamiclly, in ISAPI, no problem in stand alone. This sentence don't work: frxReport1.LoadFromFile(UniServerModule.FilesFolderPath+'ltabla.fr3'); I get connection error, Retrying ..... n And aplicarion hangs. Any idea? Thanks. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 22, 2017 Administrators Share Posted October 22, 2017 Hi, Can you start with a very basic report? It seems that some components in the report are not compatible with ISAPI mode. Make sure you don't have any report dialogs. Link to comment Share on other sites More sharing options...
jahlxx Posted October 22, 2017 Author Share Posted October 22, 2017 no dialogs. only use labels and memos. when load the report in design time, works, but not when load the report in runtine. is extange. Enviado desde mi SM-A500FU mediante Tapatalk Link to comment Share on other sites More sharing options...
adragan Posted October 23, 2017 Share Posted October 23, 2017 Start like this : Frx:=TFrxReport.Create(nil); pdf:=TFrxPdfExport.Create(nil); try frx.Clear; frx.EngineOptions.DestroyForms := False; frx.EngineOptions.SilentMode := True; frx.EngineOptions.UseGlobalDataSetList := False; frx.EngineOptions.EnableThreadSafe := True; frx.PrintOptions.ShowDialog := False; frx.PreviewOptions.AllowEdit := False; frx.ShowProgress := False; pdf.ShowDialog := False; pdf.ShowProgress := False; pdf.OverwritePrompt := False; pdf.Background := True; pdf.EmbeddedFonts := True; <You load and run the report here !! > .................................................... finally Frx.Free; Pdf.Free; end; N.B. 1. TFrxDBDataSet are not supposed to be thread safe so don't use then. 2. Put a Database connection in each report and transmit the connection parameters to it. Link to comment Share on other sites More sharing options...
jahlxx Posted October 23, 2017 Author Share Posted October 23, 2017 Great!! Thanks. It works perfect. Link to comment Share on other sites More sharing options...
albertovesx Posted October 5, 2022 Share Posted October 5, 2022 On 10/23/2017 at 1:39 AM, adragan said: 2. Put a Database connection in each report and transmit the connection parameters to it. Can you explain how? Link to comment Share on other sites More sharing options...
adragan Posted December 28, 2022 Share Posted December 28, 2022 My enviroment is : UniGui, UniDac, FastReport I put the FastReport component on the DataModule. Then in the private part of DataModule private ............. RCon:TFrxUniDacDatabase; // You have to have the full FastReport license and install those components ! // With the report designer you add a connection object on the report. You name it DConn so it can be found by name later on. // When you run the report first you do something like : procedure TUniMainModule.DoReport(rname:string; <.... some parameters for the report >); var pdf:TFrxPdfExport; procedure InitConn; begin RCon:=Frx.FindObject('DConn') as TFrxUniDacDatabase; if Assigned(RCon) then begin RCon.Connected :=False; RCon.Server :=UniMainModule.Conn.Server; RCon.DatabaseName:=UniMainModule.Conn.Database; RCon.Username :=UniMainModule.Conn.Username; RCon.Password :=UniMainModule.Conn.Password; RCon.LoginPrompt :=False; RCon.Connected :=True; end else ShowMessage('Connection ( DConn ) not existent '); end; // Conn evidently being the DB connection object from the DataModule1. // Then you run the report as shown in the first message. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now