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 9:21PM
    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 9:21PM
    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 9:21PM
    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 9:21PM
    Value = Null is bad, should be

    VarIsNull(Value)

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.