[
]我找到答案了,原来FR的FAQ中就有答案,请看:
2.30. 我的报表存储在Bolb字段中。如何修改设计器的中“打开/保存”对话框?
查看TfrDesigner组件,它有一个必须的事件: OnLoadReport和OnSaveReport。下面是个小示例:
原文:
Q: 2.30. I store my reports in a BLOb. How to change the "Open/Save" dialogs in the designer?
A: Look at TfrDesigner component. It has necessary events: OnLoadReport and OnSaveReport. Here is a small example:
procedure TForm1.frDesigner1LoadReport(Report: TfrReport;
var ReportName: String;
var Opened: Boolean);
begin
with MyOpenDialogdo
begin
Opened := ShowModal = mrOk;
if Opened then
begin
Report.LoadFromBlobField(...);
ReportName := ...;
end;
end;
end;
procedure TForm1.frDesigner1SaveReport(Report: TfrReport;
var ReportName: String;
SaveAs: Boolean;
var Saved: Boolean);
begin
if SaveAs then
with MySaveDialogdo
begin
Saved := ShowModal = mrOk;
if Saved then
begin
Report.SaveToBlobField(...);
ReportName := ...;
end;
end
else
Report.SaveToBlobField(...);
end;