; ; dtEnd.Checked = dtStart.Checked; dtEnd.CValue = dtStart.CValue; @temp=ShowSearchBox("BillSearch","HAVEDEPOT", "tbSaleBillNo1",tbSaleBillNo1.CValue); if(@temp=="") return; tbSaleBillNo1.CValue=@temp; tbSaleBillNo2.CValue = tbSaleBillNo1.CValue; @temp=ShowSearchBox("BillSearch","HAVEDEPOT", "tbSaleBillNo2",tbSaleBillNo2.CValue); if(@temp=="") return; tbSaleBillNo2.CValue=@temp; @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo1.CValue); if( @temp == "" ) return; tbCustomerNo1.CValue = @temp; tbCustomerNo2.CValue = tbCustomerNo1.CValue; @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo2.CValue); if( @temp == "" ) return; tbCustomerNo2.CValue = @temp; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProductNo1.CValue); if( @temp == "" ) return; tbProductNo1.CValue = @temp; tbProductNo2.CValue = tbProductNo1.CValue; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProductNo2.CValue); if( @temp == "" ) return; tbProductNo2.CValue = @temp; ShowSearchBox("SaleInvoiceBillSearch","NODEPOT", "tbInvoiceNo1",tbInvoiceNo1.CValue); tbInvoiceNo2.CValue = tbInvoiceNo1.CValue; ShowSearchBox("SaleInvoiceBillSearch","NODEPOT", "tbInvoiceNo2",tbInvoiceNo2.CValue); UpdateForm(false,""); @StartDate_SaleBill=DBNull(); @EndDate_SaleBill=DBNull(); @StartNo_SaleBill = DBNull(); @EndNo_SaleBill = DBNull(); @StartNo_Customer = DBNull(); @EndNo_Customer = DBNull(); @StartNo_Product = DBNull(); @EndNo_Product =DBNull(); @StartNo_Invoice = DBNull(); @EndNo_Invoice = DBNull(); @IsRtn = 0; #UI.IsRtn = "N"; if(dtStart.Checked) @StartDate_SaleBill=dtStart.Value; else #UI.StartDate_SaleBill=DBNull(); if(dtEnd.Checked) @EndDate_SaleBill=dtEnd.Value; else #UI.EndDate_SaleBill=DBNull(); if(tbSaleBillNo1.CValue != "") @StartNo_SaleBill = tbSaleBillNo1.CValue; if(tbSaleBillNo2.CValue != "") @EndNo_SaleBill = tbSaleBillNo2.CValue; if(tbCustomerNo1.CValue != "") @StartNo_Customer = tbCustomerNo1.CValue; if(tbCustomerNo2.CValue != "") @EndNo_Customer = tbCustomerNo2.CValue; if(tbProductNo1.CValue != "") @StartNo_Product = tbProduct1.CValue; if(tbProductNo2.CValue != "") @EndNo_Product = tbProduct2.CValue; if(tbInvoiceNo1.CValue != "") @StartNo_Invoice = tbInvoice1.CValue; if(tbInvoiceNo2.CValue != "") @EndNo_Invoice = tbInvoice2.CValue; if(ikRtnCheck.Checked) { @IsRtn = 1; #UI.IsRtn = "Y"; } else { @IsRtn = 0; #UI.IsRtn = "N"; } Search("SearchSaleInvoiceStatistics",@StartDate_SaleBill,@EndDate_SaleBill,@StartNo_SaleBill,@EndNo_SaleBill,@StartNo_Customer,@EndNo_Customer,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID(),GetFieldRight("销货单","特价单","查看"),@IsRtn,@StartNo_Product,@EndNo_Product,@StartNo_Invoice,@EndNo_Invoice); if(RowCount("#FrmSaleInvoiceStatistics")==0) { MessageBox("没有查找到与此相匹配的纪录,未产生报表!",@Title); } else { PrintReport("UIFrmSaleInvoiceStatistics","UI","FrmSaleInvoiceStatistics"); } UpdateForm(false,""); @StartDate_SaleBill=DBNull(); @EndDate_SaleBill=DBNull(); @StartNo_SaleBill = DBNull(); @EndNo_SaleBill = DBNull(); @StartNo_Customer = DBNull(); @EndNo_Customer = DBNull(); @IsRtn = 0; #UI.IsRtn = "N"; if(dtStart.Checked) @StartDate_SaleBill=dtStart.Value; else #UI.StartDate_SaleBill=DBNull(); if(dtEnd.Checked) @EndDate_SaleBill=dtEnd.Value; else #UI.EndDate_SaleBill=DBNull(); if(tbSaleBillNo1.CValue != "") @StartNo_SaleBill = tbSaleBillNo1.CValue; if(tbSaleBillNo2.CValue != "") @EndNo_SaleBill = tbSaleBillNo2.CValue; if(tbCustomerNo1.CValue != "") @StartNo_Customer = tbCustomerNo1.CValue; if(tbCustomerNo2.CValue != "") @EndNo_Customer = tbCustomerNo2.CValue; if(tbProductNo1.CValue != "") @StartNo_Product = tbProduct1.CValue; if(tbProductNo2.CValue != "") @EndNo_Product = tbProduct2.CValue; if(tbInvoiceNo1.CValue != "") @StartNo_Invoice = tbInvoice1.CValue; if(tbInvoiceNo2.CValue != "") @EndNo_Invoice = tbInvoice2.CValue; if(ikRtnCheck.Checked) { @IsRtn = 1; #UI.IsRtn = "Y"; } else { @IsRtn = 0; #UI.IsRtn = "N"; } Search("SearchSaleInvoiceStatistics",@StartDate_SaleBill,@EndDate_SaleBill,@StartNo_SaleBill,@EndNo_SaleBill,@StartNo_Customer,@EndNo_Customer,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID(),GetFieldRight("销货单","特价单","查看"),@IsRtn,@StartNo_Product,@EndNo_Product,@StartNo_Invoice,@EndNo_Invoice); if(RowCount("#FrmSaleInvoiceStatistics")==0) { MessageBox("没有查找到与此相匹配的纪录,未产生报表!",@Title); } else { PrintReport("Excel","UIFrmSaleInvoiceStatistics","UI","FrmSaleInvoiceStatistics"); } UpdateForm(false,""); @StartDate_SaleBill=DBNull(); @EndDate_SaleBill=DBNull(); @StartNo_SaleBill = DBNull(); @EndNo_SaleBill = DBNull(); @StartNo_Customer = DBNull(); @EndNo_Customer = DBNull(); @IsRtn = 0; #UI.IsRtn = "N"; if(dtStart.Checked) @StartDate_SaleBill=dtStart.Value; else #UI.StartDate_SaleBill=DBNull(); if(dtEnd.Checked) @EndDate_SaleBill=dtEnd.Value; else #UI.EndDate_SaleBill=DBNull(); if(tbSaleBillNo1.CValue != "") @StartNo_SaleBill = tbSaleBillNo1.CValue; if(tbSaleBillNo2.CValue != "") @EndNo_SaleBill = tbSaleBillNo2.CValue; if(tbCustomerNo1.CValue != "") @StartNo_Customer = tbCustomerNo1.CValue; if(tbCustomerNo2.CValue != "") @EndNo_Customer = tbCustomerNo2.CValue; if(tbProductNo1.CValue != "") @StartNo_Product = tbProduct1.CValue; if(tbProductNo2.CValue != "") @EndNo_Product = tbProduct2.CValue; if(tbInvoiceNo1.CValue != "") @StartNo_Invoice = tbInvoice1.CValue; if(tbInvoiceNo2.CValue != "") @EndNo_Invoice = tbInvoice2.CValue; if(ikRtnCheck.Checked) { @IsRtn = 1; #UI.IsRtn = "Y"; } else { @IsRtn = 0; #UI.IsRtn = "N"; } Search("SearchSaleInvoiceStatistics",@StartDate_SaleBill,@EndDate_SaleBill,@StartNo_SaleBill,@EndNo_SaleBill,@StartNo_Customer,@EndNo_Customer,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID(),GetFieldRight("销货单","特价单","查看"),@IsRtn,@StartNo_Product,@EndNo_Product,@StartNo_Invoice,@EndNo_Invoice); if(RowCount("#FrmSaleInvoiceStatistics")==0) { MessageBox("没有查找到与此相匹配的纪录,未产生报表!",@Title); } else { PrintReport("Word","UIFrmSaleInvoiceStatistics","UI","FrmSaleInvoiceStatistics"); } UpdateForm(false,""); @StartDate_SaleBill=DBNull(); @EndDate_SaleBill=DBNull(); @StartNo_SaleBill = DBNull(); @EndNo_SaleBill = DBNull(); @StartNo_Customer = DBNull(); @EndNo_Customer = DBNull(); @IsRtn = 0; #UI.IsRtn = "N"; if(dtStart.Checked) @StartDate_SaleBill=dtStart.Value; else #UI.StartDate_SaleBill=DBNull(); if(dtEnd.Checked) @EndDate_SaleBill=dtEnd.Value; else #UI.EndDate_SaleBill=DBNull(); if(tbSaleBillNo1.CValue != "") @StartNo_SaleBill = tbSaleBillNo1.CValue; if(tbSaleBillNo2.CValue != "") @EndNo_SaleBill = tbSaleBillNo2.CValue; if(tbCustomerNo1.CValue != "") @StartNo_Customer = tbCustomerNo1.CValue; if(tbCustomerNo2.CValue != "") @EndNo_Customer = tbCustomerNo2.CValue; if(tbProductNo1.CValue != "") @StartNo_Product = tbProduct1.CValue; if(tbProductNo2.CValue != "") @EndNo_Product = tbProduct2.CValue; if(tbInvoiceNo1.CValue != "") @StartNo_Invoice = tbInvoice1.CValue; if(tbInvoiceNo2.CValue != "") @EndNo_Invoice = tbInvoice2.CValue; if(ikRtnCheck.Checked) { @IsRtn = 1; #UI.IsRtn = "Y"; } else { @IsRtn = 0; #UI.IsRtn = "N"; } Search("SearchSaleInvoiceStatistics",@StartDate_SaleBill,@EndDate_SaleBill,@StartNo_SaleBill,@EndNo_SaleBill,@StartNo_Customer,@EndNo_Customer,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID(),GetFieldRight("销货单","特价单","查看"),@IsRtn,@StartNo_Product,@EndNo_Product,@StartNo_Invoice,@EndNo_Invoice); if(RowCount("#FrmSaleInvoiceStatistics")==0) { MessageBox("没有查找到与此相匹配的纪录,未产生报表!",@Title); } else { PrintReport("PrintToPrinter","UIFrmSaleInvoiceStatistics","UI","FrmSaleInvoiceStatistics"); } if(GetRight("客户基本资料","全权查看")) { FormatString(""); } else { FormatString(" Customer.ID_Creator='{0}' ",GetLoginUserID()); } if(GetRight("客户基本资料","全权查看")) { FormatString(""); } else { FormatString(" Disable_SaleBill=0 and Customer.ID_Creator='{0}' ",GetLoginUserID()); }