ElCherchu Posted October 11, 2021 Share Posted October 11, 2021 Hello I'm trying to pass value to variable at runtime but when I pass text the band is not displayed. In Fast Report using Unigui I define 3 variables: FromDate ToDate Title I use this function: function TfrDM.GeneraReportePDF(const RepName: string; Rep, Title: string; FromDate, ToDate: TDateTime): string; begin frxRep.PrintOptions.ShowDialog := False; frxRep.ShowProgress := false; frxRep.EngineOptions.SilentMode := True; frxRep.EngineOptions.EnableThreadSafe := True; frxRep.EngineOptions.DestroyForms := False; frxRep.EngineOptions.UseGlobalDataSetList := False; frxRep.LoadFromFile(UniServerModule.FilesFolderPath + 'Reportes\' + RepName + '.fr3'); frxPDFExport.Background := True; frxPDFExport.ShowProgress := False; frxPDFExport.ShowDialog := False; frxPDFExport.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Result, True); frxPDFExport.DefaultPath := ''; frxRep.PreviewOptions.AllowEdit := False; frxRep.Variables['FromDate'] := FromDate; frxRep.Variables['ToDate'] := ToDate; frxRep.Variables['Title'] := Title; frxRep.PrepareReport; frxRep.Export(frxPDFExport); end; The frxRep.Variables['Title'] doesn't admit a text, I don't know why... I need your help. Thanks. I using Delphi 10.2 Unigui 1.90.0.1530 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2021 Share Posted October 11, 2021 Hello, 7 minutes ago, Efrenis said: Unigui 1.90.0.1530 Trial edition? If not, adjust your account, and attach a test case, we will try to analyze your case. Quote Link to comment Share on other sites More sharing options...
ElCherchu Posted October 11, 2021 Author Share Posted October 11, 2021 2 hours ago, Sherzod said: Hello, Trial edition? If not, adjust your account, and attach a test case, we will try to analyze your case. Hi Sherzod, How can I adjust my account to attach a test case? I review all the options Thanks Quote Link to comment Share on other sites More sharing options...
markokas Posted October 11, 2021 Share Posted October 11, 2021 Hi, I think this way will be fine: frxRep.Variables['Title'] := ''''+Title+''''; br, Marko Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2021 Share Posted October 11, 2021 27 minutes ago, Efrenis said: How can I adjust my account to attach a test case? Please see this post: Quote Link to comment Share on other sites More sharing options...
ElCherchu Posted October 11, 2021 Author Share Posted October 11, 2021 Hello Markokas your right, I found the solution using: frxRep.Variables['Title'] := QuotedStr(Title); Thanks a lot. Quote Link to comment Share on other sites More sharing options...
ElCherchu Posted October 11, 2021 Author Share Posted October 11, 2021 5 hours ago, Sherzod said: Please see this post: Ok 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted October 12, 2021 Share Posted October 12, 2021 8 hours ago, Efrenis said: Hello Markokas your right, I found the solution using: frxRep.Variables['Title'] := QuotedStr(Title); Thanks a lot. Hi, Standard Method : var Memo: TfrxMemoView; // frxClass var txt:string; begin txt:='Hellow world'; if frxReport1.FindObject('mem_MyMemo') as TfrxMemoView <> Nil then begin Memo := frxReport1.FindObject('mem_MyMemo') as TfrxMemoView; Memo.Lines.Add(txt); end; end; 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.