Saving a Report from a database to a file. W/O RBuilder
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.
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.
This discussion has been closed.
Comments
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
http://www.digital-metaphors.com
info@digital-metaphors.com
this TClientDataset. I converted it to a TOracleDataset and all is well.