Help - Search - Members - Calendar
Full Version: Save Prepared Reports to Database ?
Fast Reports forum > Fast Reports Products > FastReport 2.xx CLX
odwyercm
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
klint
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.