List index out of bounds error & crosstab
D6.02,RB7.01,Flashfiler 2.12
After spending a while reading old posts and trying to solve the list out of
bounds errors I get when using the crosstab on certain data, I thought I
would pass on a solution that worked for me.
It turned out it didn't like my empty string fields that occur in my data
So I do the following and "List Index out of bounds" has gone. :-)
procedure TfmTableRep.ctLineGetDimensionValue(Sender: TObject;
aDimension: TppDimension; var aValue: Variant; var aSkip: Boolean);
begin
if (aDimension.GetDataType = dtString ) and (aValue = '')then aValue := '
';
end;
Interesting to note that the error didn't occur if the problem field was the
first column in the crosstab.
Regards, Phillip Herries
After spending a while reading old posts and trying to solve the list out of
bounds errors I get when using the crosstab on certain data, I thought I
would pass on a solution that worked for me.
It turned out it didn't like my empty string fields that occur in my data
So I do the following and "List Index out of bounds" has gone. :-)
procedure TfmTableRep.ctLineGetDimensionValue(Sender: TObject;
aDimension: TppDimension; var aValue: Variant; var aSkip: Boolean);
begin
if (aDimension.GetDataType = dtString ) and (aValue = '')then aValue := '
';
end;
Interesting to note that the error didn't occur if the problem field was the
first column in the crosstab.
Regards, Phillip Herries
This discussion has been closed.
Comments
Thanks for the solution. If you would like to send us an example, we could
test it further.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com