fpreport: TFPReportUserData work not as expected lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- af0815 · 2018-04-26 08:48 I have the following code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ....  lReportData := TFPReportUserData.Create(Self);  lReportData.Name:='userdata';  lReportData.OnGetValue := @GetReportDataValue;  lReportData.OnGetEOF := @GetReportDataEOF;  lReportData.OnFirst := @GetReportDataFirst;  lReportData.OnGetNames := @GetReportDataNames;  lReportData.InitFieldDefs;  InitialiseData;....  p := TFPReportPage.Create(FReport);  p.Orientation := poPortrait;  p.PageSize.PaperName := 'A4';  p.Data := lReportData;....  Memo := TFPReportMemo.Create(DataBand);  Memo.Font.Name := defaultFont;  Memo.Text := 'Hello world <[userdata.string]>.';....procedure TFrmSimpleReportLCL.GetReportDataFirst(Sender: TObject);begin  // Nothing to do yet, but neededend; procedure TFrmSimpleReportLCL.GetReportDataValue(Sender: TObject;  const AValueName: String; var AValue: Variant);begin  if (AValueName = 'element') or (AValueName = 'string') then  begin    AValue := sl[lReportData.RecNo-1];  end  else    AValue:=AValueName+IntToStr(lReportData.RecNo);end; procedure TFrmSimpleReportLCL.GetReportDataEOF(Sender: TObject;  var IsEOF: Boolean);begin  if lReportData.RecNo > sl.Count then    IsEOF := True  else    IsEOF := False;end; procedure TFrmSimpleReportLCL.GetReportDataNames(Sender: TObject;  List: TStrings);begin  List.Add('element');  List.Add('string');  List.Add('FirstName');  List.Add('LastName');  List.Add('DateOfBirth');  List.Add('Gender');  List.Add('Email');end; procedure TFrmSimpleReportLCL.InitialiseData;var  i: integer;begin  sl := TStringList.Create;  for i := 1 to 50 do    sl.Add(Format('Item %d', [i]));end;....  This code was working some time ago, but something is changed in the expressionparser, now i got the errormessage .... EExprParser ... 'Unknown identifier: userdata.string The full code is in lazarus trunk examples\fpreport\simple\SimpleReportLCL.lpr. I have looked in the wiki of fpreport, but the TFPReportUserData have not explained. Any hint what is changed/going wrong now? Andreas ---------------------------------------------------------------------- MvC · 2018-04-26 09:59 This should still work. If for some reason it does not, please post a sample program to demonstrate the issue in the FPC bugtracker. ---------------------------------------------------------------------- af0815 · 2018-04-26 18:52 Bug ID 33656 https://bugs.freepascal.org/view.php?id=33656 The sample code is in lazarus\examples\fpreport\simple\SimpleReportLCL.lpr