Subject | Re: [IBO] Pipeline for ReportBuilder7 Solution !! |
---|---|
Author | guido.klapperich@t-online.de |
Post date | 2003-04-09T09:52:01Z |
I have found the solution for the problem, it was in the procedure
CreateDefaultFields.
Here's the old one:
procedure TppIBOPipeline.CreateDefaultFields;
var
liField: Integer;
begin
// These tests copied from derivation to avoid processing when not wanted...
if (CreatingDefaultFields) then Exit;
if not(AutoCreateFields) then Exit;
if not(FieldsOutOfSync) then Exit;
if (csReading in ComponentState) or (csLoading in ComponentState) or
(csDestroying in ComponentState) then Exit;
inherited;
for liField := 0 to FieldCount - 1 do begin
SetWorkingColumn( Fields[liField].FieldName );
Fields[liField].FieldAlias := FWorkingColumn.DisplayName;
end;
end; //procedure, CreateDefaultFields
And here's the corrected one:
procedure TppIBOPipeline.CreateDefaultFields;
var
liField: Integer;
begin
// Guido Klapperich 08.04.2003
if Assigned(DataSource) and Assigned(DataSource.Dataset) then
begin
try
DataSource.Dataset.Open;
except
Exit;
end;
end
else
Exit;
// These tests copied from derivation to avoid processing when not wanted...
if (CreatingDefaultFields) then Exit;
if not(AutoCreateFields) then Exit;
if not(FieldsOutOfSync) then Exit;
if (csReading in ComponentState) or (csLoading in ComponentState) or
(csDestroying in ComponentState) then Exit;
inherited;
for liField := 0 to FieldCount - 1 do begin
SetWorkingColumn( Fields[liField].FieldName );
Fields[liField].FieldAlias := FWorkingColumn.DisplayName;
end;
end; //procedure, CreateDefaultFields
I have tested several situations and I don't get neither a stack overflow nor
Delphi crashes.
I would like to upload the corrected version to contributed area, but I don't
know how. Can anybody please tell how to upload.
Guido
CreateDefaultFields.
Here's the old one:
procedure TppIBOPipeline.CreateDefaultFields;
var
liField: Integer;
begin
// These tests copied from derivation to avoid processing when not wanted...
if (CreatingDefaultFields) then Exit;
if not(AutoCreateFields) then Exit;
if not(FieldsOutOfSync) then Exit;
if (csReading in ComponentState) or (csLoading in ComponentState) or
(csDestroying in ComponentState) then Exit;
inherited;
for liField := 0 to FieldCount - 1 do begin
SetWorkingColumn( Fields[liField].FieldName );
Fields[liField].FieldAlias := FWorkingColumn.DisplayName;
end;
end; //procedure, CreateDefaultFields
And here's the corrected one:
procedure TppIBOPipeline.CreateDefaultFields;
var
liField: Integer;
begin
// Guido Klapperich 08.04.2003
if Assigned(DataSource) and Assigned(DataSource.Dataset) then
begin
try
DataSource.Dataset.Open;
except
Exit;
end;
end
else
Exit;
// These tests copied from derivation to avoid processing when not wanted...
if (CreatingDefaultFields) then Exit;
if not(AutoCreateFields) then Exit;
if not(FieldsOutOfSync) then Exit;
if (csReading in ComponentState) or (csLoading in ComponentState) or
(csDestroying in ComponentState) then Exit;
inherited;
for liField := 0 to FieldCount - 1 do begin
SetWorkingColumn( Fields[liField].FieldName );
Fields[liField].FieldAlias := FWorkingColumn.DisplayName;
end;
end; //procedure, CreateDefaultFields
I have tested several situations and I don't get neither a stack overflow nor
Delphi crashes.
I would like to upload the corrected version to contributed area, but I don't
know how. Can anybody please tell how to upload.
Guido