Error Unknown Type : 14

edited October 2005 in FastReport 3.0
In the TFrxDBDataSet.DoGetValue procedure some kind of fields raise this error.

They are definitly in the Resultset. Others are displayed without any Problems.

There is an opened TADODataSet and this is linked to an TFrxDBDataSet.

Any idea whats wrong ?

EDIT:

Via the frxReport.GetValue function the values are shown without any Problem.
VarName = <TADODataset-Name>:<FieldName>.

Comments

  • edited 6:01PM
    No Answer is also an answer.

    Maybe is this an big Bug or does anyone use an TBetterAODDataset or TADODataset resultset with an TFrxDBDataSet without any Problems.



  • edited 6:01PM
    To check, if this is an bug, i used an kbmemtable and copied all record into it.

    And, which surprise, with this memory table the report works. So there is definitly an bug with TADODatasets and retrieving values from fields.
  • edited 6:01PM
    Problem located :

    Unit : frxClass.pas

    function TfrxReport.DoGetValue(const Expr: String; var Value: Variant): Boolean;
    ...
    GetDataSetAndField(Expr, ds, fld);
    if (ds <> nil) and (fld <> '') then
    begin
    Value := ds.Value[fld];
    if FEngineOptions.ConvertNulls and (Value = Null) then
    ...
    ...


    if FEngineOptions.ConvertNulls and (Value = Null) then
    raises sometimes in the ( Value = Null ) condition an Exception.

    On changing this to
    if FEngineOptions.ConvertNulls and ( VarType( Value ) = 0 ) then

    all workes fine, all all data are shown.




  • edited 6:01PM
    Value = Null is bad, should be

    VarIsNull(Value)

Leave a Comment