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

Saving a Report from a database to a file. W/O RBuilder

edited February 2002 in General
I have a report that was saved in an oracle database blob field. I know
that this report is saved correctly because I can run the report from
within RB and it produces. I wanted to write a plain delphi only
utility program that would allow me to use a query component and a
clientdataset to read this report from the database and save it back to
a template file on the hard drive. When I try to do this either using
the savetofile or a stream the size of the saved file is 32k instead of
the size of the file as imported as 48k.

Comments

  • edited February 2002
    Does the template loading fail even though it is a different size?

    The report template class (in ppTmplat.pas) can save the binary memory
    stream to file or database. It uses the same memory stream to begin with.
    Then it either creates a file stream or saves to a blob field with
    TBlobField.LoadFromStream. I would think that if you then took the binary
    indo from the blob stream, you should be able to then read it back from the
    blob field, and then eventually to file stream. I'll have to try this out.

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited February 2002
    Thanks for your reply. Sorry but I found that a BDE TQuery was being used with
    this TClientDataset. I converted it to a TOracleDataset and all is well.

This discussion has been closed.