Don't refresh data after first print
I created a unit with a report and multiple dataset at runtime, it works fine the first time, but the second does not update data.
Creation Procedure
Any idea?
Creation Procedure
  Constructor TReportContatti.Create;
  begin
    FNum := 0;
    frxReportContatti := TfrxReport.Create(Nil);
    frxUserDataSetContatti := TfrxUserDataSet.Create(Nil);
    frxUserDataSetContatti.RangeBegin := rbFirst;
    frxUserDataSetContatti.RangeEnd := reLast;
    frxUserDataSetContatti.UserName := 'frxUserDataSetContatti';
    frxUserDataSetContatti.Enabled := True;
    frxUserDataSetContatti.OnFirst := frxUserDataSetContattiFirst;
    frxUserDataSetContatti.OnCheckEOF := frxUserDataSetContattiCheckEOF;
    frxUserDataSetContatti.OnGetValue := frxUserDataSetContattiGetValue;
    frxUserDataSetContatti.OnNext := frxUserDataSetContattiNext;
    frxUserDataSetUtenze := TfrxUserDataSet.Create(Nil);
    frxUserDataSetUtenze.RangeBegin := rbFirst;
    frxUserDataSetUtenze.RangeEnd := reLast;
    frxUserDataSetUtenze.UserName := 'frxUserDataSetUtenze';
    frxUserDataSetUtenze.Enabled := True;
    frxUserDataSetUtenze.OnCheckEOF := frxUserDataSetUtenzeCheckEOF;
    frxUserDataSetUtenze.OnGetValue := frxUserDataSetUtenzeGetValue;
    frxUserDataSetContatti.Fields.Add('Nome');
    frxUserDataSetContatti.Fields.Add('Cognome');
    frxUserDataSetContatti.Fields.Add('NazioneNascita');
    frxUserDataSetContatti.Fields.Add('DataNascita');
    frxUserDataSetContatti.Fields.Add('CF');
    frxUserDataSetContatti.Fields.Add('NickName');
    frxUserDataSetContatti.Fields.Add('Indirizzo');
    frxUserDataSetContatti.Fields.Add('Citta');
    frxUserDataSetContatti.Fields.Add('Provincia');
    frxUserDataSetContatti.Fields.Add('Nazione');
    frxUserDataSetContatti.Fields.Add('Email');
    frxUserDataSetContatti.Fields.Add('SocialID');
    frxUserDataSetContatti.Fields.Add('ChatID');
    frxReportContatti.LoadFromFile('ReportContatti.fr3');
    frxReportContatti.Variables.AddVariable('Header','Header1', QuotedStr(Gv_Globals.TrascTemplate.Intestazione[1]));
    frxReportContatti.Variables.AddVariable('Header','Header2', QuotedStr(Gv_Globals.TrascTemplate.Intestazione[2]));
  end;
Any idea?
Comments
LoadFromFile() 'erases' any work which you have done before that and establishes the conditions which were present when you saved 'ReportContatti.fr3'.
When you think about it is quite logical that LoadFromFile behaves in that way.