StoreinDfm not allowing Styles loading?

fields24fields24 Tennessee
edited 1:26AM in FastReport 3.0
I am trying to use different styles in my reports as a way to change
to suit a customer's preferences but it seems to be that to be able to
have a standard report and save it in DFM I have to give up the ability
to load styles on the fly. This flag seems to be the StoreinDFM flag and
it overrides the Styles.LoadFromFile or Styles.LoadFromStream

Is there a way around this?

Thanks,
Steve Fields

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:26AM
    Steve
    quick answer don't store in dfm.
    IMHO
    Storing in dfm leads to having to use too many tfrxreport components and makes for large .exe files and any mods can only be done by you in the IDE environment.
    if you want your end user to be able to modify reports you are better off either
    storing and loading from either files or blob streams, and since you have to have a designer component included in the project you can control which folders reports are saved to or loaded from.
    by setting props for designer or for report component use a string var for the dir portion of the file name to set wich dir to load from or save to
    ie frxreport1.loadfromfile(wpath+'filename.fr3');

    ie at the application level you can give the user the choice of using supplied reports or customized reports and set the values for the dir string variables.
    when you work in this manner the number of tfrxreportcomponents you need is goverened by the the number of reports you need to have open to produce a composite report.

  • fields24fields24 Tennessee
    edited 1:26AM
    Ok.
    I will probably save the stream/text in the database.

    I was saving the styles to the same database so this will work fine.

    Thanks
    gordk wrote: »
    Steve
    quick answer don't store in dfm.
    IMHO
    Storing in dfm leads to having to use too many tfrxreport components and makes for large .exe files and any mods can only be done by you in the IDE environment.
    if you want your end user to be able to modify reports you are better off either
    storing and loading from either files or blob streams, and since you have to have a designer component included in the project you can control which folders reports are saved to or loaded from.
    by setting props for designer or for report component use a string var for the dir portion of the file name to set wich dir to load from or save to
    ie frxreport1.loadfromfile(wpath+'filename.fr3');

    ie at the application level you can give the user the choice of using supplied reports or customized reports and set the values for the dir string variables.
    when you work in this manner the number of tfrxreportcomponents you need is goverened by the the number of reports you need to have open to produce a composite report.

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.