private void loadReport() { DataSets.DsJobDocument jobDocument = new DataSets.DsJobDocument(); OracleDataAdapter DA_JobDocument = DB.selectAdapter("VW_ARMY_PUNISHMENT_DETAIL", "*", "ARMY_NO='" + ARMY_CODE + "'"); DA_JobDocument.Fill(jobDocument, jobDocument.Tables[1].TableName); ReportDataSource RDSJobDocument = new ReportDataSource("DsPunishment", jobDocument.Tables[1]); //ReportParameter[] Param = new ReportParameter[2]; //Param[0] = new ReportParameter("CompanyName", DB.GetCompanyName(), false); //Param[1] = new ReportParameter("CompanyAddress", DB.GetCompanyAddress(), false); //this.reportViewer1.LocalReport.SetParameters(Param); this.reportViewer1.LocalReport.DataSources.Clear(); this.reportViewer1.LocalReport.DataSources.Add(RDSJobDocument); this.reportViewer1.LocalReport.Refresh(); this.reportViewer1.RefreshReport(); }
private void loadReport() { DataSets.DsJobDocument jobDocument = new DataSets.DsJobDocument(); OracleDataAdapter DA_JobDocument = DB.selectAdapter("VW_ARMY_TRAINING_CYCLE", "*"); DA_JobDocument.Fill(jobDocument, jobDocument.Tables[2].TableName); ReportDataSource RDSJobDocument = new ReportDataSource("DsTrainingPlan", jobDocument.Tables[2]); //ReportParameter[] Param = new ReportParameter[2]; //Param[0] = new ReportParameter("CompanyName", DB.GetCompanyName(), false); //Param[1] = new ReportParameter("CompanyAddress", DB.GetCompanyAddress(), false); //this.reportViewer1.LocalReport.SetParameters(Param); this.reportViewer1.LocalReport.DataSources.Clear(); this.reportViewer1.LocalReport.DataSources.Add(RDSJobDocument); this.reportViewer1.LocalReport.Refresh(); this.reportViewer1.RefreshReport(); }