Jump to content

The data is not displayed in the report of Fast Report


ElCherchu

Recommended Posts

Hello programmers,

I have a problem in Fast Report using Unigui, I can't understand, when I load the report at runtime the data from my dataset is not displayed, but if I do it directly without frxReport1.LoadFromFile(); everything goes well. I'm using Delphi 10.2, UniGui 1.90.0.1530 and Fast Report 6.9.12.

The idea is to be able to load my reports at runtime and have the data displayed, I use 

function TfrDM.GeneraReportePDF(const RepName: string): string;
begin
  try
    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 + RepName + '.fr3');
    if frxRep.Version >= '6.0.0' then frxRep.DataSets.Add(frxDSetRecibos);

    frxPDFExport.Background := True;
    frxPDFExport.ShowProgress := False;
    frxPDFExport.ShowDialog := False;
    frxPDFExport.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Result, True);
    frxPDFExport.DefaultPath := '';

    frxRep.PreviewOptions.AllowEdit := False;
    frxRep.PrepareReport;
    frxRep.Export(frxPDFExport);
  finally
  end;
end;

If I comment the line frxRep.LoadFromFile(UniServerModule.FilesFolderPath + RepName + '.fr3'); everything goes well but as I said before the idea is to load report at runtime

Can anyone help me?

I will be very grateful, thanks..

Link to comment
Share on other sites

23 hours ago, Efrenis said:

if frxRep.Version >= '6.0.0' then frxRep.DataSets.Add(frxDSetRecibos);

Hey mhmda for your reply, but the I solved the problem, I’m explain it for everybody, the lines in quotes I changed for 

if frxRep.Version >= '6.0.0' then 
begin
  frxRep.DataSets.Add(frxDSetRecibos);
  frxRep.DataSets.Add(frxDSetData2);
;

Because I use 2 datasets in my report, it’s necessary to add all the dataset used in report. 

All is ok now. 

Thank. 

Link to comment
Share on other sites

15 hours ago, Efrenis said:

Hey mhmda for your reply, but the I solved the problem, I’m explain it for everybody, the lines in quotes I changed for 


if frxRep.Version >= '6.0.0' then 
begin
  frxRep.DataSets.Add(frxDSetRecibos);
  frxRep.DataSets.Add(frxDSetData2);
;

Because I use 2 datasets in my report, it’s necessary to add all the dataset used in report. 

All is ok now. 

Thank. 

 

Hello, you can see:

http://forums.unigui.com/index.php?/topic/12090-fastreport-6_3/

 

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.

×
×
  • Create New...