lazreport: uppercase variable before comparing with hardcoded functions. Properly fix to 21624

git-svn-id: trunk@36539 -
This commit is contained in:
blikblum 2012-04-03 09:55:36 +00:00
parent aefd41ef26
commit fea7df6a87

View File

@ -8107,6 +8107,7 @@ var
Value: TfrValue;
D: TfrTDataSet;
F: TfrTField;
s1: String;
function MasterBand: TfrBand;
begin
@ -8165,23 +8166,26 @@ begin
else if (D<>nil) and (roIgnoreFieldNotFound in FReportOptions) and
lrValidFieldReference(s) then
aValue := Null
else if s = 'VALUE' then
else
begin
s1 := AnsiUpperCase(s);
if s1 = 'VALUE' then
aValue:= CurValue
else if s = frSpecFuncs[0] then
else if s1 = frSpecFuncs[0] then
aValue:= PageNo + 1
else if s = frSpecFuncs[2] then
else if s1 = frSpecFuncs[2] then
aValue := CurDate
else if s = frSpecFuncs[3] then
else if s1 = frSpecFuncs[3] then
aValue:= CurTime
else if s = frSpecFuncs[4] then
else if s1 = frSpecFuncs[4] then
aValue:= MasterBand.Positions[psLocal]
else if s = frSpecFuncs[5] then
else if s1 = frSpecFuncs[5] then
aValue:= MasterBand.Positions[psGlobal]
else if s = frSpecFuncs[6] then
else if s1 = frSpecFuncs[6] then
aValue:= CurPage.ColPos
else if s = frSpecFuncs[7] then
else if s1 = frSpecFuncs[7] then
aValue:= CurPage.CurPos
else if s = frSpecFuncs[8] then
else if s1 = frSpecFuncs[8] then
aValue:= SavedAllPages
else
begin
@ -8190,7 +8194,7 @@ begin
aValue:= frVariables[s];
Exit;
end else
if CompareText(s,'REPORTTITLE')=0 then
if s1 = 'REPORTTITLE' then
begin
aValue := Title;
Exit;
@ -8205,6 +8209,7 @@ begin
end;
end;
end;
end;
end;
procedure TfrReport.OnGetParsFunction(const aName: String; p1, p2, p3: Variant;