View Issue Details

IDProjectCategoryView StatusLast Update
0033656FPCPackagespublic2018-05-10 09:28
ReporterAndi FriessAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformDell XPSOSWin10 / 64 ProOS VersionWin10 / 64 Pro
Product Version3.1.1Product Build38845 
Target Version3.2.0Fixed in Version3.1.1 
Summary0033656: preport: TFPReportUserData raise Unknown identifier
DescriptionThe code in in lazarus\examples\fpreport\simple\SimpleReportLCL.lpr was working was time ago (27.2.2018 Lazarus svn 57394), but now i got the errormessage .... EExprParser ... 'Unknown identifier: userdata.string


Steps To ReproduceA) Open Lazarus trunk, open the example in\examples\fpreport\simple\SimpleReportLCL.lpr

B) Run the code and press one of the Render-buttons. All renderer have the same issue.
Additional Information....
  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]>.';
....
TagsfpReport
Fixed in Revision38905
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2018-05-05 11:39

administrator   ~0108145

This is not a bug per se.

The expression engine is fed with report data, and only the datasets in the ReportDataset are added. This indeed changed.

That means that you needed to add them explicitly to the collection:
  FReport.ReportData.AddReportData(lReportData);

However, to make things easier, I have added a routine that scans the well-known sources of dataloops and adds them automatically when the report is run.
(see collectreportdata)

Andi Friess

2018-05-10 09:28

reporter   ~0108219

THX for fixing AND the information about the changed behavior.

Issue History

Date Modified Username Field Change
2018-04-26 20:49 Andi Friess New Issue
2018-04-26 20:50 Andi Friess Tag Attached: fpReport
2018-05-04 09:01 Stephano Assigned To => Stephano
2018-05-04 09:01 Stephano Status new => confirmed
2018-05-04 09:01 Stephano Assigned To Stephano => Michael Van Canneyt
2018-05-04 09:01 Stephano Status confirmed => assigned
2018-05-05 11:39 Michael Van Canneyt Fixed in Revision => 38905
2018-05-05 11:39 Michael Van Canneyt Note Added: 0108145
2018-05-05 11:39 Michael Van Canneyt Status assigned => resolved
2018-05-05 11:39 Michael Van Canneyt Fixed in Version => 3.1.1
2018-05-05 11:39 Michael Van Canneyt Resolution open => fixed
2018-05-05 11:39 Michael Van Canneyt Target Version => 3.2.0
2018-05-10 09:28 Andi Friess Note Added: 0108219
2018-05-10 09:28 Andi Friess Status resolved => closed