unit u_rp_no_total; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, bsSkinCtrls, ExtCtrls, ComCtrls, bsSkinTabs, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner; type Tfrm_rp_no_total = class(TForm) Panel1: TPanel; bsSkinPanel2: TbsSkinPanel; bsSkinButton10: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton1: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsSkinCheckRadioBox1: TbsSkinCheckRadioBox; bsSkinCheckRadioBox2: TbsSkinCheckRadioBox; bsSkinCheckRadioBox3: TbsSkinCheckRadioBox; p_total: TADOStoredProc; p_total1: TDataSource; p_total_client1: TDataSource; p_total_client: TADOStoredProc; p_total_sales: TADOStoredProc; p_total_sales1: TDataSource; SaveDialog: TSaveDialog; bsSkinPageControl4: TbsSkinPageControl; bsSkinTabSheet1: TbsSkinTabSheet; bsSkinTabSheet2: TbsSkinTabSheet; bsSkinTabSheet3: TbsSkinTabSheet; dxDBGrid1: TdxDBGrid; dxDBGridMaskColumn95: TdxDBGridMaskColumn; dxDBGrid1Column23: TdxDBGridColumn; dxDBGridColumn17: TdxDBGridColumn; dxDBGridColumn18: TdxDBGridColumn; dxDBGridColumn19: TdxDBGridColumn; dxDBGridColumn20: TdxDBGridColumn; dxDBGridColumn21: TdxDBGridColumn; dxDBGridColumn22: TdxDBGridColumn; dxDBGridColumn23: TdxDBGridColumn; dxDBGridColumn24: TdxDBGridColumn; dxDBGridColumn25: TdxDBGridColumn; dxDBGridColumn26: TdxDBGridColumn; dxDBGridColumn27: TdxDBGridColumn; dxDBGridColumn28: TdxDBGridColumn; dxDBGridColumn29: TdxDBGridColumn; dxDBGridColumn30: TdxDBGridColumn; dxDBGridColumn31: TdxDBGridColumn; dxDBGridColumn32: TdxDBGridColumn; dxDBGridColumn33: TdxDBGridColumn; dxDBGridColumn34: TdxDBGridColumn; dxDBGridColumn35: TdxDBGridColumn; dxDBGridColumn36: TdxDBGridColumn; dxDBGridColumn37: TdxDBGridColumn; dxDBGrid2: TdxDBGrid; dxDBGridMaskColumn96: TdxDBGridMaskColumn; dxDBGrid2Column23: TdxDBGridColumn; dxDBGridColumn38: TdxDBGridColumn; dxDBGridColumn39: TdxDBGridColumn; dxDBGridColumn40: TdxDBGridColumn; dxDBGridColumn41: TdxDBGridColumn; dxDBGridColumn42: TdxDBGridColumn; dxDBGridColumn43: TdxDBGridColumn; dxDBGridColumn44: TdxDBGridColumn; dxDBGridColumn45: TdxDBGridColumn; dxDBGridColumn46: TdxDBGridColumn; dxDBGridColumn47: TdxDBGridColumn; dxDBGridColumn48: TdxDBGridColumn; dxDBGridColumn49: TdxDBGridColumn; dxDBGridColumn50: TdxDBGridColumn; dxDBGridColumn51: TdxDBGridColumn; dxDBGridColumn52: TdxDBGridColumn; dxDBGridColumn53: TdxDBGridColumn; dxDBGridColumn54: TdxDBGridColumn; dxDBGridColumn55: TdxDBGridColumn; dxDBGridColumn56: TdxDBGridColumn; dxDBGridColumn57: TdxDBGridColumn; dxDBGridColumn58: TdxDBGridColumn; dxDBGrid3: TdxDBGrid; dxDBGrid3Column22: TdxDBGridColumn; dxDBGridColumn59: TdxDBGridColumn; dxDBGridColumn60: TdxDBGridColumn; dxDBGridColumn61: TdxDBGridColumn; dxDBGridColumn62: TdxDBGridColumn; dxDBGridColumn63: TdxDBGridColumn; dxDBGridColumn64: TdxDBGridColumn; dxDBGridColumn65: TdxDBGridColumn; dxDBGridColumn66: TdxDBGridColumn; dxDBGridColumn67: TdxDBGridColumn; dxDBGridColumn68: TdxDBGridColumn; dxDBGridColumn69: TdxDBGridColumn; dxDBGridColumn70: TdxDBGridColumn; dxDBGridColumn71: TdxDBGridColumn; dxDBGridColumn72: TdxDBGridColumn; dxDBGridColumn73: TdxDBGridColumn; dxDBGridColumn74: TdxDBGridColumn; dxDBGridColumn75: TdxDBGridColumn; dxDBGridColumn76: TdxDBGridColumn; dxDBGridColumn77: TdxDBGridColumn; dxDBGridColumn78: TdxDBGridColumn; dxDBGridColumn79: TdxDBGridColumn; procedure bsSkinButton5Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Panel1Resize(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid2ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); private { Private declarations } public { Public declarations } end; var frm_rp_no_total: Tfrm_rp_no_total; implementation uses u_main, u_rp_no_seae_query,my_sys_function; {$R *.dfm} procedure Tfrm_rp_no_total.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_rp_no_total.FormClose(Sender: TObject; var Action: TCloseAction); begin frm_rp_no_total.Hide; frm_rp_no_total.ManualFloat(frm_rp_no_total.BoundsRect ); frm_main.freeTabs('frm_rp_no_total'); action:=cafree; frm_rp_no_total:=nil; end; procedure Tfrm_rp_no_total.Panel1Resize(Sender: TObject); var i:integer; begin i:=round(bsSkinPanel2.Width/7); bsSkinCheckRadioBox1.Width:=i; bsSkinCheckRadioBox2.Width:=i; bsSkinCheckRadioBox3.Width:=i; bsSkinButton10.Width:=i; bsSkinButton9.Width:=i; bsSkinButton1.Width:=i; end; procedure Tfrm_rp_no_total.bsSkinButton10Click(Sender: TObject); begin try frm_rp_no_seae_query:=tfrm_rp_no_seae_query.Create (self); frm_rp_no_seae_query.Caption:='所有欠费统计'; no_seae_query_bs:=5; no_seae_query_limited:='0033'; if bsSkinCheckRadioBox1.Checked then no_seae_query_fee:=1 else if bsSkinCheckRadioBox2.Checked then no_seae_query_fee:=2 else no_seae_query_fee:=3; frm_rp_no_seae_query.ShowModal; finally frm_rp_no_seae_query.Free; end; end; procedure Tfrm_rp_no_total.bsSkinButton1Click(Sender: TObject); begin with SaveDialog do begin DefaultExt :='xls'; Filter := '(*.xls)|*.xls'; if Execute then begin if bsSkinTabSheet1.Showing then dxDBGrid1.SaveToXLS(FileName,true) else if bsSkinTabSheet2.Showing then dxDBGrid2.SaveToXLS(FileName,true) else if bsSkinTabSheet3.Showing then dxDBGrid3.SaveToXLS(FileName,true); end; end; end; procedure Tfrm_rp_no_total.bsSkinButton9Click(Sender: TObject); begin sys_print('欠费综合分析',2,nil,nil,nil,nil,p_total_client1,p_total_sales1,p_total1,nil,nil,nil,nil); end; procedure Tfrm_rp_no_total.dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_total_client,'客户名称'); end; procedure Tfrm_rp_no_total.dxDBGrid2ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_total_sales,'客户名称'); end; procedure Tfrm_rp_no_total.dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_total,'业务种类'); end; end.