Crosstab error
When I run a cross-tab that I have formatted in the display format to show decimal values I get the following error message: Project Project1.exe raised exception class EvariantTypeCastError with message 'Could not convert variant of type (OleStr into type (Double)'. Process stopped. It happens when I compile from the IDE but not when I run it stand alone. I have dropped crossobject, dialog controls, DBE components and OLEObjects on the form. What have I missed?
Comments
use IBObjects
I find two situations for this Crros-tab problem.
I use FR on Interbase dtb with same structure but created with different dialect
field def
SUMA COMPUTED BY ...
1/
dialect 1 - FR run without error
and field is published as DOUBLE PRECISION
2/
dialect 3 - not run - OleVAriant conversion error
field is published as INT64
Has anybody similar experience?
Or wich part of soucen would be changed?
Thaks Honza
Hi All,
I find solution
put the new lines into
file FR_Cross1 procedure Build near line 950
if FuncName(FCellFields) = 'count' then
begin
v := 0;
if f.Value <> Null then
v := 1;
end
else begin
<span style='color:red'> if f.IsNumeric then begin
v:= f.AsDouble
end else</span> v := f.Value;
end;
and my cross-tab works
Bye