Save Prepared Reports to Database ?

I have a requirement to archive daily reports which my application produces. I need to maintain an archive of these reports. Currently I am storing all the prepared reports in .frp files.
Is there an easy way to store these prepared reports in a database in such a way that they can be easily accessed by Fast Reports.
I know that Fast Reports has functionality to easily store the report template (.frf) files.
How can I do the same with the prepared report files.

Any info is appreciated

Thanks
Conor

Comments

  • edited 11:35AM
    stream it into a tblobfield if you're using dbaware controls.

    ms := tmemorystream.create;
    frReport1.loadfromfile('areport.frf');
    frReport1.PrepareReport;
    frReport1.EMFPages.savetostream(ms);

    ms.seek(0,soFromBeginning);
    reporttable.insert;
    reporttableblob.loadfromstream(ms);
    reporttable.post;

    to view

    ms := tmemorystream.create;
    reporttableblob.savetostream(ms);
    frReport1.EMFPages.loadfromstream(ms);
    frReport1.ShowPreparedReport;

    klint.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.