StoreinDfm not allowing Styles loading?
fields24
Tennessee
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
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
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.
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