toggle menu
FastReport Forum
FastReport Forum
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Activity
Sign In
·
Register
×
Home
›
Fast Reports Products
›
FastReport 3.0
Save report in DB
anmisoft
May 2006
edited 11:45PM
in
FastReport 3.0
Hi. Is it possible to save a report in database using fast report 3.0??s object properties or must i do it manually?
thanks
Comments
PJCF
Jersey, Channel Islands, UK
May 2006
edited 11:45PM
Have a look at the SaveToFile procedure and the LoadFromFile function - I think this is what you might need - I haven't used these myself but believe it is what you are looking for.
Hope it helps - Peter
Shivan
Germany
May 2006
edited 11:45PM
You can easily save Reports in a blob by using streams.
react on the event "OnSaveReport"
Validate the data (SaveAs)
and use Report.SaveToStream to save it to a memory stream. This can then be loaded into your blob by casting:
<span style='font-family:Courier'>myStream: TMemoryStream;
Report.SaveToStream(myStream);
myDataset.(FieldByName('ReportData') as TBlobField).LoadFromStream(myStream);</span>
Loading see reverse
<span style='font-family:Courier'>myDataSet.(FieldByName('ReportData) as TBlobField).SaveToStream(myStream);
Report.LoadFromStream(myStream);</span>
Leave a Comment
Paragraph
H2
Toggle Heading Menu
List Unordered
Toggle Heading Menu
Quote
Toggle Heading Menu
Paragraph
Paragraph
H2
Heading 2
H3
Heading 3
H4
Heading 4
H5
Heading 5
List Unordered
Bulleted List
List Ordered
Ordered List
Indent
Indent
Outdent
Outdent
Quote
Quote
Paragraph Code Block
Code Block
Spoiler
Spoiler
Bold
Italic
Strikethrough
Paragraph Code Block
Link
Close
Emoji
Embed
Home
•
FastReport 3.0
Comment As ...
Comments
Hope it helps - Peter
react on the event "OnSaveReport"
Validate the data (SaveAs)
and use Report.SaveToStream to save it to a memory stream. This can then be loaded into your blob by casting:
<span style='font-family:Courier'>myStream: TMemoryStream;
Report.SaveToStream(myStream);
myDataset.(FieldByName('ReportData') as TBlobField).LoadFromStream(myStream);</span>
Loading see reverse
<span style='font-family:Courier'>myDataSet.(FieldByName('ReportData) as TBlobField).SaveToStream(myStream);
Report.LoadFromStream(myStream);</span>