Board index » delphi » Challenging Questions: Saving Quick Reports in InterBase Blobs fields.

Challenging Questions: Saving Quick Reports in InterBase Blobs fields.

Does anybody know how to save a quickreport to a BLOB field in an InterBase
table? It is quite clever that when previewing a QuickReport you can save an
image of the preview to a file. I would like to save this image in a BLOB
field and then load it again for re-printing at a later date. Does anybody
know how to do this?

Jonathan Elkins
email: JonathanElk...@vttgroup.com
Systems Manager
Vancouver Tours and Transit
Vancouver, British Columbia

 

Re:Challenging Questions: Saving Quick Reports in InterBase Blobs fields.


In article <WE4A1.246$%43.650...@newsgate.direct.ca>,
JonathanElk...@vttgroup.com says...

Quote
> Does anybody know how to save a quickreport to a BLOB field in an InterBase
> table? It is quite clever that when previewing a QuickReport you can save an
> image of the preview to a file. I would like to save this image in a BLOB
> field and then load it again for re-printing at a later date. Does anybody
> know how to do this?

I'm not sure which version of QuickReport I have (it's whatever came with
Delphi 2.0) but... It doesn't look like there is a SaveToStream method
but the QRPrinter object has a Save method that takes a file name as a
parameter. You could try saving the report to a tempfile, load the BLOB
field from the tempfile using LoadFromFile, and then delete the tempfile.
Then in reverse, save the BLOB field to a file with SaveToFile, load it
in to QRPrinter with Load(Filename), and then delete the file.

John

Other Threads