public static void TestSubReport(string opYear, int opMonth, string directorID, string managerID) { frmPrint frmprint = new frmPrint(); List <DataTable> tbList = new List <DataTable>(); Database db = MyDLLs.MyDBFactory.GetDatabase(OPGlobals.dbProvider); string strsql = ""; DbConnection conn = db.CreateDbConnection(Database.ConnectionType.ConnectionString, OPGlobals.connString); //strsql = ReportQueries.QMonthlyProgress(opYear, opMonth, false, directorID, managerID); strsql = MonthlyProgress.GetQueryMonthlyProgress(opYear, opMonth, directorID, managerID); DataTable tb = db.GetDataTable(conn, strsql); frmprint.dataTable = tb; tb = CapitalWork.GetTableCapitalWorksMonthlyProgress(opYear, opMonth, directorID, managerID); tbList.Add(tb); strsql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(opYear, opMonth, directorID, managerID); tb = db.GetDataTable(conn, strsql); tbList.Add(tb); frmprint.subDataTable = tbList; frmprint.dataTable = tb; frmprint.reportName = @"rpt1.rdlc"; frmprint.Show(); }
private void PrintSubReportyMonth() { Months m = (Months)Enum.Parse(typeof(Months), cboOPMonth.SelectedValue.ToString()); //string month = OPGlobals.currentMonth.ToString(); string year = cboOPYear.Text; string servicePlanSql = GetServicePlanForSubReporting(year, (int)m, cboServicePlan.SelectedValue.ToString()); //"Select A.id As service_plan_id, A.service_plan, B.actions As action, C.kpm As kpm, D.cwp As cwp From service_plan A" //+ " Left Join(Select action.service_plan_id, COUNT(*) As actions From action Group By action.service_plan_id) B" //+ " On B.service_plan_id = A.id Left Join (Select kpi.service_plan_id, COUNT(*) As kpm From kpi Group By kpi.service_plan_id) C" //+ " On C.service_plan_id = A.id Left Join (Select capital_works.capital_works_service_plann_id As service_plan_id, COUNT(*) As cwp From capital_works Group By capital_works.capital_works_service_plann_id) D" //+ " On D.service_plan_id = A.id where service_plan != '-NONE-';"; string actionSql = "", kpmSql = "", cwpSql = ""; actionSql = MonthlyProgress.GetQueryMonthlyProgress(cboServicePlan.SelectedValue.ToString(), cboOPYear.Text, (int)m); cwpSql = CapitalWork.GetSQLCapitalWorksMonthlyProgress(cboServicePlan.SelectedValue.ToString(), cboOPYear.Text, (int)m); kpmSql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(cboServicePlan.SelectedValue.ToString(), cboOPYear.Text, (int)m); clsReports.PrintSubReport(servicePlanSql, actionSql, kpmSql, cwpSql); }
public static void PrintKPIProgressFull(string opYear, int opMonth, string directorID, string managerId) { string strsql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(opYear, opMonth, directorID, managerId); PrintKPIProgressReportFull(strsql); }
public static void PrintKPIProgressFull(string opYear, int opMonth) { string strsql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(opYear, opMonth); PrintKPIProgressReportFull(strsql); }
public static void PrintKPIProgressCouncil(string serviceID, string opYear, int opMonth) { string strsql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(serviceID, opYear, opMonth); PrintKPIProgressReportCouncil(strsql); }
public static void PrintKPIProgressCouncil(string opYear, int opMonth, string directorID) { string strsql = KeyPerformanceIndex.GetMonthlyKPIProgressQuery(opYear, opMonth, directorID); PrintKPIProgressReportCouncil(strsql); }