procedure TMainForm.DBGridSaveToFile(ADefaultExt, AFilter, AFileName: String;
AllFlag:boolean;
AMethod: TSaveMethod);
begin
with SaveDialogMaindo
begin
DefaultExt := ADefaultExt;
Filter := AFilter;
FileName := AFileName;
if Execute then
begin
AMethod(FileName, AllFlag);
end;
end;
end;
procedure TFromPrint.ActionOutPutHTMExecute(Sender: TObject);
var vFileFilter:string;
begin
vFileFilter:='HTM文件(*.htm)|*.htm';
case dxPageControl1.ActivePage.PageIndex of
0:MainForm.DBGridSaveToFile('htm', vFileFilter, '111.htm',iif(DBGrid.SelectedCount>1,False,True),DBGrid.SaveToHTML);
end;
end;
Reportbuilder生成的报表导出生成Excel或网页是可行的,你试试上面的程序,用到了好几个函数