Save reports to dababse

Hello

I??m using reportbuilder and I`m evaluating Fastreport VCL.
it??s posible to save and load reports tempalte from data base?, where can I find any example?
Thanks

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:07AM
    yes you can

    To Save
    stream := TMemoryStream.Create;
    TfrxReport.SaveToStream(stream);
    stream.Position := 0;
    (dataset.fieldByName('my_blob') as TBlobField).LoadFromStream(stream);

    To Load:
    stream := TMemoryStream.Create;
    (dataset.fieldByName('my_blob') as TBlobField).SaveToStream(stream);
    stream.Position := 0;
    TfrxReport.LoadFromStream(stream);
  • edited 10:07AM
    gordk wrote: »
    yes you can

    To Save
    stream := TMemoryStream.Create;
    TfrxReport.SaveToStream(stream);
    stream.Position := 0;
    (dataset.fieldByName('my_blob') as TBlobField).LoadFromStream(stream);

    To Load:
    stream := TMemoryStream.Create;
    (dataset.fieldByName('my_blob') as TBlobField).SaveToStream(stream);
    stream.Position := 0;
    TfrxReport.LoadFromStream(stream);

    Ok, Thanks

    and how can I intercept save event report?
  • gordkgordk St.Catherines On. Canada.
    edited 10:07AM
    include the tfrxdesigner in your project and write the code in the onsave report event of the designer.

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.