瀏覽報表的代碼如下:
對應的路徑文件均存在,打印是瀏覽後直接按報表裡的打印按鈕!
procedure TForm1.PrintClick(Sender: TObject);
var
PImg: string;
begin
RMGridReport1.LoadFromFile('D:\Reports\PC001');
try
with RMGridReport1.Dictionary do
begin
Variables.Insert(VARIABLES.Count, 'PImg');
Variables.AsString['PImg'] := PImg;
end;
RMGridReport1.ShowReport;
finally
end;
end;