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

  • edited 8:22PM
    I'm also have this problem but sometime it works sometime not. ;)
    use IBObjects
  • edited 8:22PM
    Hi All,
    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
  • edited 8:22PM
    ;)
    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

Leave a Comment