Are there any examples for writing an archive report to a blob field in a database table and then previewing the archive report from the database table?
I don't know if there are any examples around, but it is as easy as loading a file into a BLOB. The current implementation of archived reports needs the filesystem (unfortunately, I hope the next release will give us a stream capable solution), after archiving you have to load the created file into a stream (TMemo-, TFile-) and save it to the BLOB. Another approach would be the implementation of a own ArchiveDevice, but that's not a beginners job.
Here ya go. The next version of RB will have a new archive reader class which more easily allows you to have descendents. One descendent we have added is the DBArchiveReader. You can connect it up to a datapipeline which it can read archives from the table and preview them, just like the current file based archive reader does. The following example will only work if you aren't using RAP (interface section changed, so you'll have to wait until the next maintenance release to get the new RAP dcus), since it includes the new version of the archive reader component. The example is fully functional. It loads archive files of your choice into a paradox table, and then creates a DBArchiveReader component to load the archives from the BLOB field and shows them in the screen preview.
Comments
I don't know if there are any examples around, but it is as easy as loading
a file into a BLOB.
The current implementation of archived reports needs the filesystem
(unfortunately, I hope the next release will give us a stream capable
solution), after archiving you have to load the created file into a stream
(TMemo-, TFile-) and save it to the BLOB.
Another approach would be the implementation of a own ArchiveDevice, but
that's not a beginners job.
regards,
Chris Ueberall;
which more easily allows you to have descendents. One descendent we have
added is the DBArchiveReader. You can connect it up to a datapipeline which
it can read archives from the table and preview them, just like the current
file based archive reader does. The following example will only work if you
aren't using RAP (interface section changed, so you'll have to wait until
the next maintenance release to get the new RAP dcus), since it includes the
new version of the archive reader component. The example is fully
functional. It loads archive files of your choice into a paradox table, and
then creates a DBArchiveReader component to load the archives from the BLOB
field and shows them in the screen preview.
http://www.digital-metaphors.com/tips/DBArchiveReader.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
'hope we'll see it soon ;-)
Cheers,
Chris Ueberall;