mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 15:19:36 +01:00
lazreport: uppercase variable before comparing with hardcoded functions. Properly fix to 21624
git-svn-id: trunk@36539 -
This commit is contained in:
parent
aefd41ef26
commit
fea7df6a87
@ -8107,6 +8107,7 @@ var
|
|||||||
Value: TfrValue;
|
Value: TfrValue;
|
||||||
D: TfrTDataSet;
|
D: TfrTDataSet;
|
||||||
F: TfrTField;
|
F: TfrTField;
|
||||||
|
s1: String;
|
||||||
|
|
||||||
function MasterBand: TfrBand;
|
function MasterBand: TfrBand;
|
||||||
begin
|
begin
|
||||||
@ -8165,23 +8166,26 @@ begin
|
|||||||
else if (D<>nil) and (roIgnoreFieldNotFound in FReportOptions) and
|
else if (D<>nil) and (roIgnoreFieldNotFound in FReportOptions) and
|
||||||
lrValidFieldReference(s) then
|
lrValidFieldReference(s) then
|
||||||
aValue := Null
|
aValue := Null
|
||||||
else if s = 'VALUE' then
|
else
|
||||||
|
begin
|
||||||
|
s1 := AnsiUpperCase(s);
|
||||||
|
if s1 = 'VALUE' then
|
||||||
aValue:= CurValue
|
aValue:= CurValue
|
||||||
else if s = frSpecFuncs[0] then
|
else if s1 = frSpecFuncs[0] then
|
||||||
aValue:= PageNo + 1
|
aValue:= PageNo + 1
|
||||||
else if s = frSpecFuncs[2] then
|
else if s1 = frSpecFuncs[2] then
|
||||||
aValue := CurDate
|
aValue := CurDate
|
||||||
else if s = frSpecFuncs[3] then
|
else if s1 = frSpecFuncs[3] then
|
||||||
aValue:= CurTime
|
aValue:= CurTime
|
||||||
else if s = frSpecFuncs[4] then
|
else if s1 = frSpecFuncs[4] then
|
||||||
aValue:= MasterBand.Positions[psLocal]
|
aValue:= MasterBand.Positions[psLocal]
|
||||||
else if s = frSpecFuncs[5] then
|
else if s1 = frSpecFuncs[5] then
|
||||||
aValue:= MasterBand.Positions[psGlobal]
|
aValue:= MasterBand.Positions[psGlobal]
|
||||||
else if s = frSpecFuncs[6] then
|
else if s1 = frSpecFuncs[6] then
|
||||||
aValue:= CurPage.ColPos
|
aValue:= CurPage.ColPos
|
||||||
else if s = frSpecFuncs[7] then
|
else if s1 = frSpecFuncs[7] then
|
||||||
aValue:= CurPage.CurPos
|
aValue:= CurPage.CurPos
|
||||||
else if s = frSpecFuncs[8] then
|
else if s1 = frSpecFuncs[8] then
|
||||||
aValue:= SavedAllPages
|
aValue:= SavedAllPages
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -8190,7 +8194,7 @@ begin
|
|||||||
aValue:= frVariables[s];
|
aValue:= frVariables[s];
|
||||||
Exit;
|
Exit;
|
||||||
end else
|
end else
|
||||||
if CompareText(s,'REPORTTITLE')=0 then
|
if s1 = 'REPORTTITLE' then
|
||||||
begin
|
begin
|
||||||
aValue := Title;
|
aValue := Title;
|
||||||
Exit;
|
Exit;
|
||||||
@ -8206,6 +8210,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrReport.OnGetParsFunction(const aName: String; p1, p2, p3: Variant;
|
procedure TfrReport.OnGetParsFunction(const aName: String; p1, p2, p3: Variant;
|
||||||
var val: Variant);
|
var val: Variant);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user