using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; namespace FastReport { public class ReportScript { public double totalSum = 0; public double totalHisSum = 0; public double deptSum = 0; public double deptHisSum = 0; public string deptName = "科室"; private void CostCount_AfterData(object sender, EventArgs e) { DataSourceBase rowData = Report.GetDataSource("P"); // if(deptName.Equals(rowData["DeptName"].ToString())) // { // deptSum += Convert.ToDouble(rowData["SettleFee"].ToString()); // deptHisSum += Convert.ToDouble(rowData["Fee"].ToString()); // // Cell38.Text = deptSum.ToString(); // Cell50.Text = deptHisSum.ToString(); // }else{ // // if(deptName == "科室"){ // // deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); // deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); // // Cell38.Text = rowData["SettleFee"].ToString(); // Cell50.Text = rowData["Fee"].ToString(); // // }else{ // // deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); // deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); // // Cell38.Text = deptSum.ToString(); // Cell50.Text = deptHisSum.ToString(); // } // // deptName = rowData["DeptName"].ToString(); // } } } }