在 Delphi 2009 中,我安装了 Fast Report 4.8,并创建了一些报告。在我的应用程序中,我像这样使用这些报告:
myfrxReport.ShowReport();
现在有些用户想编辑报表页面,所以我使用了frxDesigner。但我的问题是:“如何保存用户更改?”
在 Delphi 2009 中,我安装了 Fast Report 4.8,并创建了一些报告。在我的应用程序中,我像这样使用这些报告:
myfrxReport.ShowReport();
现在有些用户想编辑报表页面,所以我使用了frxDesigner。但我的问题是:“如何保存用户更改?”
将报告用作文件,然后用户可以在设计器中覆盖该报告文件。下次加载报告时,用户会加载修改后的报告。
frxReport.LoadFromFile(aFileName); //The report filename with the user changes
frxReport.PrepareReport(true);
frxReport.ShowReport;
还要检查frxDesigner.Restrictions
选项!
你可以这段代码:
if not FrxReport.LoadFromFile(AFileName) then
FrxReport.DesignReport
else if TAppUtils.Confirm('You Have Authority To Design Report. Do You Want To Design Report ?') then
FrxReport.DesignReport
else
FrxReport.ShowReport(True);
TAppUtils.Confirm : 确认用户是否做某事的方法