cxgrid打印

简介:

  begintime,endtime:string;
begin
  begintime := FormatDateTime('yyyy-MM-dd 00:00:00',dtp_begin.DateTime);
  endtime := FormatDateTime('yyyy-MM-dd 23:59:59',dtp_end.DateTime);
  dxComponentPrinter1Link1.ReportTitle.Text := '日期:' + begintime + '至' + endtime;
  dxComponentPrinter1Link1.ReportTitle.Font.Size := 10;
  dxComponentPrinter1Link1.ReportTitle.Font.Name := '宋体';
  dxComponentPrinter1Link1.PrinterPage.PageHeader.CenterTitle.Text := '科室收入统计';
  dxComponentPrinter1Link1.PrinterPage.PageHeader.Font.Size := 14;
  dxComponentPrinter1Link1.PrinterPage.PageHeader.Font.Name := '宋体';

  dxComponentPrinter1.Preview(True,dxComponentPrinter1Link1);

//dxComponentPrinter1.Print(True,nil,dxComponentPrinter1Link1);
















本文转自鹅倌51CTO博客,原文链接: http://blog.51cto.com/kaixinbuliao/1585403,如需转载请自行联系原作者







相关文章
cxgrid多选获取记录。不需要设置KeyFieldName
procedure CopyGridRecordToJsn(pvDataSet: TcxGridDBTableView; pvValueJsn:    ISuperObject);var  i, j: Integer;  lvField: TcxGridDBColumn;  lvItem: I...
795 0