LazReport, fix crash on aggregate functions if using frUserDataset

git-svn-id: trunk@27506 -
This commit is contained in:
jesus 2010-09-28 14:46:06 +00:00
parent 81974df6bd
commit b5451e65dc
2 changed files with 6 additions and 4 deletions

View File

@ -7878,7 +7878,7 @@ begin
// val := '0';
val := varempty;
{$ifdef DebugLR}
DebugLn('%sOnGetParsFunction aName=%s p1=%s p2=%s p3=%s ccc=%d',[sspc,aName,p1,p2,p3,ccc]);
DebugLn('%sOnGetParsFunction aName=%s p1=%s p2=%s p3=%s',[sspc,aName,p1,p2,p3]);
{$endif}
for i := 0 to frFunctionsCount - 1 do
if frFunctions[i].FunctionLibrary.OnFunction(aName, p1, p2, p3, val) then
@ -9500,8 +9500,10 @@ begin
btSubDetailData,btCrossData])
then
DataSet := nil
else
else begin
Dataset := nil;
frGetDataSetAndField(lrGetUnBrackedStr(p1), DataSet, Field);
end;
end;
if (DataSet <> nil) and (Field <> nil) and AggrBand.Visible then

View File

@ -37,7 +37,7 @@ procedure frEnableControls(c: Array of TControl; e: Boolean);
function frControlAtPos(Win: TWinControl; p: TPoint): TControl;
function frGetDataSet(ComplexName: String): TfrTDataSet;
procedure frGetDataSetAndField(ComplexName: String;
var DataSet: TfrTDataSet; var Field: TfrTField);
var DataSet: TfrTDataSet; out Field: TfrTField);
function frGetFontStyle(Style: TFontStyles): Integer;
function frSetFontStyle(Style: Integer): TFontStyles;
procedure frInitFont(aFont : TFont; aColor : TColor; aSize : Integer; aStyle : TFontStyles);
@ -320,7 +320,7 @@ begin
end;
procedure frGetDataSetAndField(ComplexName: String; var DataSet: TfrTDataSet;
var Field: TfrTField);
out Field: TfrTField);
var
n: Integer;
f: TComponent;