Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

RB10 LoadFromDatabase Error

edited February 2006 in General
I have an application that keeps reports in a database using
"ppReport.Template.SaveToDatabase" and "ppReport.Template.LoadFromDatabase".
That application works fine with RB9.
I am using ADO with SQL Server 2000/2005 and the datatype field containig
the reports is 'ntext'.

After upgrading from RB9 to RB10, the "LoadFromDatabase" raises an exeption
ETemplateSaveError with message "can't save the model in a field of this
type".

Why this stop worked in RB10?
What can I do?

Comments

  • edited March 2006
    Hi Rui,

    Did you change anything else when upgrading to RB 10? Are you using a newer
    version of SQL Server? Are you using a different version of Delphi?
    ReportBuilder relies on the Delphi representation of a field as a TFieldType
    then converts this type to a TppDataType using the ppConvertFieldType
    routine located in the ppDBPipe.pas file. If this type is not dtBlob or
    dtMemo, the exceptinon you are seeing is thrown. There have been no major
    changes in the field type conversion since RB 9. The proper field type to
    use for the Template field in SQL Server is "IMAGE".

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hello,

    You said

    For template in text the field type should be TEXT?

    I get the same error load form database (using SQL Server and ADO). Could
    the pipeline is still empty, so no fields are available?

  • edited March 2006
    Hi Nico,

    I am saving the template in text format, so I use field type ntext.
    I really did not change a thing in the project, BUT, yes I am using Delphi
    2006 now. Maybe because of that?
    So, what can I do?

    Thanks
    Rui Menino



  • edited March 2006
    Hi,

    I use a TEXT field and that works. Maybe NTEXT will work also.
    What I did is: I made a new test app from scratch with a ADOConnection,
    ADODataset, ppDBPipeline, TPPReport, TPPDesigner, TPPViewer(that's out of
    the top of my head) and put that on a form and that worked!
    After I discover that I removed all the RB object inthe real applications,
    placed new ones, and it was OK. Maybe you should try that. It seems that
    just recompiling using the new RB version is not enough...?

    Wim

  • edited March 2006
    Hi Wim and Rui,

    Thanks for all the info. I was able to track this down as just an issue
    with ReportBuilder for Delphi 2006. It seems Delphi 2006 sees a "ntext"
    field as the new datatype, ftWideMemo or a TWideMemoField. There is now a
    patch available that fixes this issue. Please send a small email to
    support@digital-metaphors.com requesting the patch and we'll send it to you.

    Note that this patch is only necessary if you are using ReportBuilder 10.x
    with Delphi 2006.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.