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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.