Browse Source

更新夹杂物国标显示界面导出功能

zhangjiaxin 1 month ago
parent
commit
113e1e24d5

+ 51 - 29
OTSIncAReportApp/1-UI/GBCalculate/ChineseStandardABCDDS.cs

@@ -29,6 +29,8 @@ namespace OTSIncAReportGB
         public DataTable m_dt_D = new DataTable();
         public DataTable m_dt_DS = new DataTable();
 
+        public List<DataTable> m_dt_dall = new List<DataTable>();
+
         //底层相关,项目操作管理类
         CReportMgrClr m_ReportMgrClr = null;
 
@@ -268,11 +270,11 @@ namespace OTSIncAReportGB
         {
 
             DataAll = in_list_CGridDataClrAll;
-        
 
+            m_dt_dall = new List<DataTable>();
 
-            //获取报告项目类对象
-            m_ReportMgrClr = in_Cotsreportprojfilemgrclr;
+			//获取报告项目类对象
+			m_ReportMgrClr = in_Cotsreportprojfilemgrclr;
 
             m_list_cgriddataclr_A = in_list_CGridDataClrAll.GetRange(0, 1);
             m_list_cgriddataclr_B = in_list_CGridDataClrAll.GetRange(1, 1);
@@ -386,7 +388,13 @@ namespace OTSIncAReportGB
                 m_dt_D = ChineseStandardABCD_GetDataTable_Total(m_list_cgriddataclr_D, out m_oneresult_columnscount_D);
                 m_dt_DS = ChineseStandardABCD_GetDataTable_Total(m_list_cgriddataclr_DS, out m_oneresult_columnscount_DS);
 
-                DataView dv = m_dt_DS.DefaultView;
+                m_dt_dall.Add(m_dt_A);
+				m_dt_dall.Add(m_dt_B);
+				m_dt_dall.Add(m_dt_C);
+				m_dt_dall.Add(m_dt_D);
+				m_dt_dall.Add(m_dt_DS);
+
+				DataView dv = m_dt_DS.DefaultView;
                 dv.Sort = "Grade desc";
                 DataTable dt_DS_data = dv.ToTable();
                 Gview_gzA.DataSource = m_dt_A;
@@ -873,33 +881,47 @@ namespace OTSIncAReportGB
         }
         #endregion
 
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
-        
         private void button_preview_Click(object sender, EventArgs e)
         {
-            Cursor.Current = Cursors.WaitCursor;
 
-            MemoryManagementClass.FlushMemory(); 
-            Cursor.Current = Cursors.WaitCursor;
-        }
+			frmReportApp frmReportApp = (frmReportApp)this.ParentForm.ParentForm;
+			OTSReport_Export oe = new OTSReport_Export(frmReportApp, true);
+			GBReport GB_Report = new GBReport(frmReportApp, table);
+
+			int index = frmReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+			List<string> datasourcelist = oe.m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+			OTSCLRINTERFACE.CPropParamClr clr_prop = oe.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+			clr_prop.SetDataSourceList(datasourcelist);
+			clr_prop.SetDataSourceId(index);//
+			clr_prop.SetCalTableType((int)CALCULATE_TABLE_TYPE.GB_Method1);
+			clr_prop.SetType((int)DisplayPicutureType.AnalyzeDataTable);//table
+            frmReportApp.m_rstDataMgr.SetWorkingResultId(index);
+			var tbl = oe.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetAllGBFields(clr_prop);
+			GB_Report.setResultGrid(oe.m_mbszclass, tbl, datasourcelist[index]);
+
+			oe.Dispose();
+			oe = null;
+			DataView dv_gb1 = m_dt_dall[4].DefaultView;
+			dv_gb1.Sort = "Grade desc";
+			DataTable dt_gb1 = dv_gb1.ToTable();
+			for (int i = 0; i < m_dt_dall[4].Rows.Count; i++)
+			{
+				for (int a = 0; a < m_dt_dall[4].Columns.Count; a++)
+				{
+					m_dt_dall[4].Rows[i][a] = dt_gb1.Rows[i][a];
+				}
+			}
+
+			List<string> GB1NameList = new List<string>();
+			GB1NameList.Add("A类");
+			GB1NameList.Add("B类");
+			GB1NameList.Add("C类");
+			GB1NameList.Add("D类");
+			GB1NameList.Add("DS类");
+			GB_Report.set_GB_Method(m_dt_dall, GB1NameList, "方法一");
+
+			DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(GB_Report);
+			tool.ShowPreview();
+		}
     }
 }

+ 61 - 6
OTSIncAReportApp/1-UI/GBCalculate/NationalStandardMethodTwo.cs

@@ -11,6 +11,9 @@ using System.Windows.Forms;
 using OTSCLRINTERFACE;
 using System.Collections;
 using OTSCommon;
+using OTSIncAReportApp.ReportTemplate;
+using OTSIncAReportApp;
+using OTSIncAReportApp.OTSSampleReportInfo;
 
 namespace OTSIncAReportGB
 {
@@ -25,8 +28,10 @@ namespace OTSIncAReportGB
         public DataTable m_dt_sulfide = new DataTable();
         public DataTable m_dt_DS = new DataTable();
 
-        //底层相关,项目操作管理类
-        CReportMgrClr m_ReportMgrClr = null;
+		public List<DataTable> m_dt_dall = new List<DataTable>();
+
+		//底层相关,项目操作管理类
+		CReportMgrClr m_ReportMgrClr = null;
 
 
         //获取从框架得到的底层计算结果,国标表A
@@ -406,7 +411,14 @@ namespace OTSIncAReportGB
                 m_dt_sulfide = ChineseStandardABCD_GetDataTable_Total(m_list_cgriddataclr_sulfide, out m_oneresult_columnscount_sulfide);
                 m_dt_DS = ChineseStandardABCD_GetDataTable_Total(m_list_cgriddataclr_DS, out m_oneresult_columnscount_DS);
 
-                DataView dv = m_dt_DS.DefaultView;
+                m_dt_dall.Add(m_dt_A);
+				m_dt_dall.Add(m_dt_B);
+				m_dt_dall.Add(m_dt_C);
+				m_dt_dall.Add(m_dt_D);
+				m_dt_dall.Add(m_dt_sulfide);
+				m_dt_dall.Add(m_dt_DS);
+
+				DataView dv = m_dt_DS.DefaultView;
                 dv.Sort = "Grade desc";
                 DataTable dt_DS_data = dv.ToTable();
 
@@ -1114,9 +1126,52 @@ namespace OTSIncAReportGB
 
         private void button_preview_Click(object sender, EventArgs e)
         {
-
-        }
-    }
+			frmReportApp frmReportApp = (frmReportApp)this.ParentForm.ParentForm;
+			OTSReport_Export oe = new OTSReport_Export(frmReportApp, true);
+			GBReport GB_Report = new GBReport(frmReportApp, table);
+
+			int index = frmReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+			List<string> datasourcelist = oe.m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
+			OTSCLRINTERFACE.CPropParamClr clr_prop = oe.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+			clr_prop.SetDataSourceList(datasourcelist);
+			clr_prop.SetDataSourceId(index);//
+			clr_prop.SetCalTableType((int)CALCULATE_TABLE_TYPE.GB_Method1);
+			clr_prop.SetType((int)DisplayPicutureType.AnalyzeDataTable);//table
+			frmReportApp.m_rstDataMgr.SetWorkingResultId(index);
+			var tbl = oe.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetAllGBFields(clr_prop);
+			GB_Report.setResultGrid(oe.m_mbszclass, tbl, datasourcelist[index]);
+
+			oe.Dispose();
+			oe = null;
+
+
+			DataView dv_gb1 = m_dt_dall[5].DefaultView;
+			dv_gb1.Sort = "Grade desc";
+			DataTable dt_gb1 = dv_gb1.ToTable();
+			for (int i = 0; i < m_dt_dall[5].Rows.Count; i++)
+			{
+				for (int a = 0; a < m_dt_dall[5].Columns.Count; a++)
+				{
+					m_dt_dall[5].Rows[i][a] = dt_gb1.Rows[i][a];
+				}
+
+			}
+
+
+			List<string> GB2NameList = new List<string>();
+			GB2NameList.Add("A类");
+			GB2NameList.Add("B类");
+			GB2NameList.Add("C类");
+			GB2NameList.Add("D类");
+			GB2NameList.Add("D硫化物类");
+			GB2NameList.Add("DS类");
+			GB_Report.set_GB_Method(m_dt_dall, GB2NameList, "方法二");
+
+			DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(GB_Report);
+			tool.ShowPreview();
+		}
+		
+	}
 }
 
 

+ 338 - 337
OTSIncAReportApp/1-UI/GBCalculate/NationalStandardMethodTwo.designer.cs

@@ -28,343 +28,344 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NationalStandardMethodTwo));
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.log_5_1 = new System.Windows.Forms.Label();
-            this.log_4_1 = new System.Windows.Forms.Label();
-            this.log_3_1 = new System.Windows.Forms.Label();
-            this.log_2_1 = new System.Windows.Forms.Label();
-            this.log_1_1 = new System.Windows.Forms.Label();
-            this.log_5 = new System.Windows.Forms.Label();
-            this.log_4 = new System.Windows.Forms.Label();
-            this.log_3 = new System.Windows.Forms.Label();
-            this.log_2 = new System.Windows.Forms.Label();
-            this.log_1 = new System.Windows.Forms.Label();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.Gview_gzDS = new System.Windows.Forms.DataGridView();
-            this.sulfide = new System.Windows.Forms.DataGridView();
-            this.label6 = new System.Windows.Forms.Label();
-            this.label5 = new System.Windows.Forms.Label();
-            this.Gview_gzD = new System.Windows.Forms.DataGridView();
-            this.label4 = new System.Windows.Forms.Label();
-            this.Gview_gzC = new System.Windows.Forms.DataGridView();
-            this.label3 = new System.Windows.Forms.Label();
-            this.Gview_gzB = new System.Windows.Forms.DataGridView();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
-            this.Gview_gzA = new System.Windows.Forms.DataGridView();
-            this.button_preview = new System.Windows.Forms.Button();
-            this.panel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.sulfide)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // panel1
-            // 
-            this.panel1.AutoScroll = true;
-            this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.panel1.Controls.Add(this.button_preview);
-            this.panel1.Controls.Add(this.log_5_1);
-            this.panel1.Controls.Add(this.log_4_1);
-            this.panel1.Controls.Add(this.log_3_1);
-            this.panel1.Controls.Add(this.log_2_1);
-            this.panel1.Controls.Add(this.log_1_1);
-            this.panel1.Controls.Add(this.log_5);
-            this.panel1.Controls.Add(this.log_4);
-            this.panel1.Controls.Add(this.log_3);
-            this.panel1.Controls.Add(this.log_2);
-            this.panel1.Controls.Add(this.log_1);
-            this.panel1.Controls.Add(this.pictureBox1);
-            this.panel1.Controls.Add(this.Gview_gzDS);
-            this.panel1.Controls.Add(this.sulfide);
-            this.panel1.Controls.Add(this.label6);
-            this.panel1.Controls.Add(this.label5);
-            this.panel1.Controls.Add(this.Gview_gzD);
-            this.panel1.Controls.Add(this.label4);
-            this.panel1.Controls.Add(this.Gview_gzC);
-            this.panel1.Controls.Add(this.label3);
-            this.panel1.Controls.Add(this.Gview_gzB);
-            this.panel1.Controls.Add(this.label2);
-            this.panel1.Controls.Add(this.label1);
-            this.panel1.Controls.Add(this.Gview_gzA);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.panel1.Location = new System.Drawing.Point(0, 0);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1009, 1147);
-            this.panel1.TabIndex = 0;
-            // 
-            // log_5_1
-            // 
-            this.log_5_1.AutoSize = true;
-            this.log_5_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_5_1.ForeColor = System.Drawing.Color.Red;
-            this.log_5_1.Location = new System.Drawing.Point(86, 1106);
-            this.log_5_1.Name = "log_5_1";
-            this.log_5_1.Size = new System.Drawing.Size(55, 16);
-            this.log_5_1.TabIndex = 27;
-            this.log_5_1.Text = "label6";
-            // 
-            // log_4_1
-            // 
-            this.log_4_1.AutoSize = true;
-            this.log_4_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_4_1.ForeColor = System.Drawing.Color.Red;
-            this.log_4_1.Location = new System.Drawing.Point(86, 1070);
-            this.log_4_1.Name = "log_4_1";
-            this.log_4_1.Size = new System.Drawing.Size(55, 16);
-            this.log_4_1.TabIndex = 26;
-            this.log_4_1.Text = "label9";
-            // 
-            // log_3_1
-            // 
-            this.log_3_1.AutoSize = true;
-            this.log_3_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_3_1.ForeColor = System.Drawing.Color.Red;
-            this.log_3_1.Location = new System.Drawing.Point(86, 1034);
-            this.log_3_1.Name = "log_3_1";
-            this.log_3_1.Size = new System.Drawing.Size(55, 16);
-            this.log_3_1.TabIndex = 25;
-            this.log_3_1.Text = "label8";
-            // 
-            // log_2_1
-            // 
-            this.log_2_1.AutoSize = true;
-            this.log_2_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_2_1.ForeColor = System.Drawing.Color.Red;
-            this.log_2_1.Location = new System.Drawing.Point(86, 998);
-            this.log_2_1.Name = "log_2_1";
-            this.log_2_1.Size = new System.Drawing.Size(55, 16);
-            this.log_2_1.TabIndex = 24;
-            this.log_2_1.Text = "label7";
-            // 
-            // log_1_1
-            // 
-            this.log_1_1.AutoSize = true;
-            this.log_1_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_1_1.ForeColor = System.Drawing.Color.Red;
-            this.log_1_1.Location = new System.Drawing.Point(86, 962);
-            this.log_1_1.Name = "log_1_1";
-            this.log_1_1.Size = new System.Drawing.Size(55, 16);
-            this.log_1_1.TabIndex = 23;
-            this.log_1_1.Text = "label6";
-            // 
-            // log_5
-            // 
-            this.log_5.AutoSize = true;
-            this.log_5.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_5.ForeColor = System.Drawing.Color.Red;
-            this.log_5.Location = new System.Drawing.Point(86, 1088);
-            this.log_5.Name = "log_5";
-            this.log_5.Size = new System.Drawing.Size(55, 16);
-            this.log_5.TabIndex = 21;
-            this.log_5.Text = "label6";
-            // 
-            // log_4
-            // 
-            this.log_4.AutoSize = true;
-            this.log_4.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_4.ForeColor = System.Drawing.Color.Red;
-            this.log_4.Location = new System.Drawing.Point(86, 1052);
-            this.log_4.Name = "log_4";
-            this.log_4.Size = new System.Drawing.Size(55, 16);
-            this.log_4.TabIndex = 20;
-            this.log_4.Text = "label9";
-            // 
-            // log_3
-            // 
-            this.log_3.AutoSize = true;
-            this.log_3.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_3.ForeColor = System.Drawing.Color.Red;
-            this.log_3.Location = new System.Drawing.Point(86, 1016);
-            this.log_3.Name = "log_3";
-            this.log_3.Size = new System.Drawing.Size(55, 16);
-            this.log_3.TabIndex = 19;
-            this.log_3.Text = "label8";
-            // 
-            // log_2
-            // 
-            this.log_2.AutoSize = true;
-            this.log_2.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_2.ForeColor = System.Drawing.Color.Red;
-            this.log_2.Location = new System.Drawing.Point(86, 980);
-            this.log_2.Name = "log_2";
-            this.log_2.Size = new System.Drawing.Size(55, 16);
-            this.log_2.TabIndex = 18;
-            this.log_2.Text = "label7";
-            // 
-            // log_1
-            // 
-            this.log_1.AutoSize = true;
-            this.log_1.Font = new System.Drawing.Font("宋体", 12F);
-            this.log_1.ForeColor = System.Drawing.Color.Red;
-            this.log_1.Location = new System.Drawing.Point(86, 944);
-            this.log_1.Name = "log_1";
-            this.log_1.Size = new System.Drawing.Size(55, 16);
-            this.log_1.TabIndex = 17;
-            this.log_1.Text = "label6";
-            // 
-            // pictureBox1
-            // 
-            this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
-            this.pictureBox1.Location = new System.Drawing.Point(1207, 945);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(168, 31);
-            this.pictureBox1.TabIndex = 12;
-            this.pictureBox1.TabStop = false;
-            // 
-            // Gview_gzDS
-            // 
-            this.Gview_gzDS.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Gview_gzDS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Gview_gzDS.Location = new System.Drawing.Point(88, 801);
-            this.Gview_gzDS.Name = "Gview_gzDS";
-            this.Gview_gzDS.RowTemplate.Height = 23;
-            this.Gview_gzDS.Size = new System.Drawing.Size(918, 137);
-            this.Gview_gzDS.TabIndex = 11;
-            // 
-            // sulfide
-            // 
-            this.sulfide.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.sulfide.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.sulfide.Location = new System.Drawing.Point(88, 646);
-            this.sulfide.Name = "sulfide";
-            this.sulfide.RowTemplate.Height = 23;
-            this.sulfide.Size = new System.Drawing.Size(918, 137);
-            this.sulfide.TabIndex = 10;
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label6.Location = new System.Drawing.Point(3, 801);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(47, 19);
-            this.label6.TabIndex = 9;
-            this.label6.Text = "DS类";
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label5.Location = new System.Drawing.Point(3, 646);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(88, 19);
-            this.label5.TabIndex = 8;
-            this.label5.Text = "D硫化物类";
-            // 
-            // Gview_gzD
-            // 
-            this.Gview_gzD.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Gview_gzD.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Gview_gzD.Location = new System.Drawing.Point(88, 491);
-            this.Gview_gzD.Name = "Gview_gzD";
-            this.Gview_gzD.RowTemplate.Height = 23;
-            this.Gview_gzD.Size = new System.Drawing.Size(918, 137);
-            this.Gview_gzD.TabIndex = 7;
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label4.Location = new System.Drawing.Point(3, 491);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(37, 19);
-            this.label4.TabIndex = 6;
-            this.label4.Text = "D类";
-            // 
-            // Gview_gzC
-            // 
-            this.Gview_gzC.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Gview_gzC.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Gview_gzC.Location = new System.Drawing.Point(88, 336);
-            this.Gview_gzC.Name = "Gview_gzC";
-            this.Gview_gzC.RowTemplate.Height = 23;
-            this.Gview_gzC.Size = new System.Drawing.Size(918, 137);
-            this.Gview_gzC.TabIndex = 5;
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label3.Location = new System.Drawing.Point(3, 336);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(36, 19);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "C类";
-            // 
-            // Gview_gzB
-            // 
-            this.Gview_gzB.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Gview_gzB.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Gview_gzB.Location = new System.Drawing.Point(88, 181);
-            this.Gview_gzB.Name = "Gview_gzB";
-            this.Gview_gzB.RowTemplate.Height = 23;
-            this.Gview_gzB.Size = new System.Drawing.Size(918, 137);
-            this.Gview_gzB.TabIndex = 3;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label2.Location = new System.Drawing.Point(3, 181);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(36, 19);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "B类";
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.label1.Location = new System.Drawing.Point(3, 26);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(36, 19);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "A类";
-            // 
-            // Gview_gzA
-            // 
-            this.Gview_gzA.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Gview_gzA.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Gview_gzA.Location = new System.Drawing.Point(88, 26);
-            this.Gview_gzA.Name = "Gview_gzA";
-            this.Gview_gzA.RowTemplate.Height = 23;
-            this.Gview_gzA.Size = new System.Drawing.Size(918, 137);
-            this.Gview_gzA.TabIndex = 0;
-            // 
-            // button_preview
-            // 
-            this.button_preview.Location = new System.Drawing.Point(1012, 16);
-            this.button_preview.Name = "button_preview";
-            this.button_preview.Size = new System.Drawing.Size(90, 32);
-            this.button_preview.TabIndex = 28;
-            this.button_preview.Text = "报表预览";
-            this.button_preview.UseVisualStyleBackColor = true;
-            // 
-            // NationalStandardMethodTwo
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.AutoScroll = true;
-            this.Controls.Add(this.panel1);
-            this.Name = "NationalStandardMethodTwo";
-            this.Size = new System.Drawing.Size(1009, 1147);
-            this.Load += new System.EventHandler(this.NationalStandardMethodTwo_Load);
-            this.panel1.ResumeLayout(false);
-            this.panel1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.sulfide)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).EndInit();
-            this.ResumeLayout(false);
+			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NationalStandardMethodTwo));
+			this.panel1 = new System.Windows.Forms.Panel();
+			this.button_preview = new System.Windows.Forms.Button();
+			this.log_5_1 = new System.Windows.Forms.Label();
+			this.log_4_1 = new System.Windows.Forms.Label();
+			this.log_3_1 = new System.Windows.Forms.Label();
+			this.log_2_1 = new System.Windows.Forms.Label();
+			this.log_1_1 = new System.Windows.Forms.Label();
+			this.log_5 = new System.Windows.Forms.Label();
+			this.log_4 = new System.Windows.Forms.Label();
+			this.log_3 = new System.Windows.Forms.Label();
+			this.log_2 = new System.Windows.Forms.Label();
+			this.log_1 = new System.Windows.Forms.Label();
+			this.pictureBox1 = new System.Windows.Forms.PictureBox();
+			this.Gview_gzDS = new System.Windows.Forms.DataGridView();
+			this.sulfide = new System.Windows.Forms.DataGridView();
+			this.label6 = new System.Windows.Forms.Label();
+			this.label5 = new System.Windows.Forms.Label();
+			this.Gview_gzD = new System.Windows.Forms.DataGridView();
+			this.label4 = new System.Windows.Forms.Label();
+			this.Gview_gzC = new System.Windows.Forms.DataGridView();
+			this.label3 = new System.Windows.Forms.Label();
+			this.Gview_gzB = new System.Windows.Forms.DataGridView();
+			this.label2 = new System.Windows.Forms.Label();
+			this.label1 = new System.Windows.Forms.Label();
+			this.Gview_gzA = new System.Windows.Forms.DataGridView();
+			this.panel1.SuspendLayout();
+			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.sulfide)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).BeginInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).BeginInit();
+			this.SuspendLayout();
+			// 
+			// panel1
+			// 
+			this.panel1.AutoScroll = true;
+			this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.panel1.Controls.Add(this.button_preview);
+			this.panel1.Controls.Add(this.log_5_1);
+			this.panel1.Controls.Add(this.log_4_1);
+			this.panel1.Controls.Add(this.log_3_1);
+			this.panel1.Controls.Add(this.log_2_1);
+			this.panel1.Controls.Add(this.log_1_1);
+			this.panel1.Controls.Add(this.log_5);
+			this.panel1.Controls.Add(this.log_4);
+			this.panel1.Controls.Add(this.log_3);
+			this.panel1.Controls.Add(this.log_2);
+			this.panel1.Controls.Add(this.log_1);
+			this.panel1.Controls.Add(this.pictureBox1);
+			this.panel1.Controls.Add(this.Gview_gzDS);
+			this.panel1.Controls.Add(this.sulfide);
+			this.panel1.Controls.Add(this.label6);
+			this.panel1.Controls.Add(this.label5);
+			this.panel1.Controls.Add(this.Gview_gzD);
+			this.panel1.Controls.Add(this.label4);
+			this.panel1.Controls.Add(this.Gview_gzC);
+			this.panel1.Controls.Add(this.label3);
+			this.panel1.Controls.Add(this.Gview_gzB);
+			this.panel1.Controls.Add(this.label2);
+			this.panel1.Controls.Add(this.label1);
+			this.panel1.Controls.Add(this.Gview_gzA);
+			this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+			this.panel1.Location = new System.Drawing.Point(0, 0);
+			this.panel1.Name = "panel1";
+			this.panel1.Size = new System.Drawing.Size(1009, 1147);
+			this.panel1.TabIndex = 0;
+			// 
+			// button_preview
+			// 
+			this.button_preview.Location = new System.Drawing.Point(1012, 16);
+			this.button_preview.Name = "button_preview";
+			this.button_preview.Size = new System.Drawing.Size(90, 32);
+			this.button_preview.TabIndex = 28;
+			this.button_preview.Text = "报表预览";
+			this.button_preview.UseVisualStyleBackColor = true;
+			this.button_preview.Click += new System.EventHandler(this.button_preview_Click);
+			// 
+			// log_5_1
+			// 
+			this.log_5_1.AutoSize = true;
+			this.log_5_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_5_1.ForeColor = System.Drawing.Color.Red;
+			this.log_5_1.Location = new System.Drawing.Point(86, 1106);
+			this.log_5_1.Name = "log_5_1";
+			this.log_5_1.Size = new System.Drawing.Size(55, 16);
+			this.log_5_1.TabIndex = 27;
+			this.log_5_1.Text = "label6";
+			// 
+			// log_4_1
+			// 
+			this.log_4_1.AutoSize = true;
+			this.log_4_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_4_1.ForeColor = System.Drawing.Color.Red;
+			this.log_4_1.Location = new System.Drawing.Point(86, 1070);
+			this.log_4_1.Name = "log_4_1";
+			this.log_4_1.Size = new System.Drawing.Size(55, 16);
+			this.log_4_1.TabIndex = 26;
+			this.log_4_1.Text = "label9";
+			// 
+			// log_3_1
+			// 
+			this.log_3_1.AutoSize = true;
+			this.log_3_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_3_1.ForeColor = System.Drawing.Color.Red;
+			this.log_3_1.Location = new System.Drawing.Point(86, 1034);
+			this.log_3_1.Name = "log_3_1";
+			this.log_3_1.Size = new System.Drawing.Size(55, 16);
+			this.log_3_1.TabIndex = 25;
+			this.log_3_1.Text = "label8";
+			// 
+			// log_2_1
+			// 
+			this.log_2_1.AutoSize = true;
+			this.log_2_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_2_1.ForeColor = System.Drawing.Color.Red;
+			this.log_2_1.Location = new System.Drawing.Point(86, 998);
+			this.log_2_1.Name = "log_2_1";
+			this.log_2_1.Size = new System.Drawing.Size(55, 16);
+			this.log_2_1.TabIndex = 24;
+			this.log_2_1.Text = "label7";
+			// 
+			// log_1_1
+			// 
+			this.log_1_1.AutoSize = true;
+			this.log_1_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_1_1.ForeColor = System.Drawing.Color.Red;
+			this.log_1_1.Location = new System.Drawing.Point(86, 962);
+			this.log_1_1.Name = "log_1_1";
+			this.log_1_1.Size = new System.Drawing.Size(55, 16);
+			this.log_1_1.TabIndex = 23;
+			this.log_1_1.Text = "label6";
+			// 
+			// log_5
+			// 
+			this.log_5.AutoSize = true;
+			this.log_5.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_5.ForeColor = System.Drawing.Color.Red;
+			this.log_5.Location = new System.Drawing.Point(86, 1088);
+			this.log_5.Name = "log_5";
+			this.log_5.Size = new System.Drawing.Size(55, 16);
+			this.log_5.TabIndex = 21;
+			this.log_5.Text = "label6";
+			// 
+			// log_4
+			// 
+			this.log_4.AutoSize = true;
+			this.log_4.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_4.ForeColor = System.Drawing.Color.Red;
+			this.log_4.Location = new System.Drawing.Point(86, 1052);
+			this.log_4.Name = "log_4";
+			this.log_4.Size = new System.Drawing.Size(55, 16);
+			this.log_4.TabIndex = 20;
+			this.log_4.Text = "label9";
+			// 
+			// log_3
+			// 
+			this.log_3.AutoSize = true;
+			this.log_3.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_3.ForeColor = System.Drawing.Color.Red;
+			this.log_3.Location = new System.Drawing.Point(86, 1016);
+			this.log_3.Name = "log_3";
+			this.log_3.Size = new System.Drawing.Size(55, 16);
+			this.log_3.TabIndex = 19;
+			this.log_3.Text = "label8";
+			// 
+			// log_2
+			// 
+			this.log_2.AutoSize = true;
+			this.log_2.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_2.ForeColor = System.Drawing.Color.Red;
+			this.log_2.Location = new System.Drawing.Point(86, 980);
+			this.log_2.Name = "log_2";
+			this.log_2.Size = new System.Drawing.Size(55, 16);
+			this.log_2.TabIndex = 18;
+			this.log_2.Text = "label7";
+			// 
+			// log_1
+			// 
+			this.log_1.AutoSize = true;
+			this.log_1.Font = new System.Drawing.Font("宋体", 12F);
+			this.log_1.ForeColor = System.Drawing.Color.Red;
+			this.log_1.Location = new System.Drawing.Point(86, 944);
+			this.log_1.Name = "log_1";
+			this.log_1.Size = new System.Drawing.Size(55, 16);
+			this.log_1.TabIndex = 17;
+			this.log_1.Text = "label6";
+			// 
+			// pictureBox1
+			// 
+			this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
+			this.pictureBox1.Location = new System.Drawing.Point(1207, 945);
+			this.pictureBox1.Name = "pictureBox1";
+			this.pictureBox1.Size = new System.Drawing.Size(168, 31);
+			this.pictureBox1.TabIndex = 12;
+			this.pictureBox1.TabStop = false;
+			// 
+			// Gview_gzDS
+			// 
+			this.Gview_gzDS.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.Gview_gzDS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.Gview_gzDS.Location = new System.Drawing.Point(88, 801);
+			this.Gview_gzDS.Name = "Gview_gzDS";
+			this.Gview_gzDS.RowTemplate.Height = 23;
+			this.Gview_gzDS.Size = new System.Drawing.Size(918, 137);
+			this.Gview_gzDS.TabIndex = 11;
+			// 
+			// sulfide
+			// 
+			this.sulfide.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.sulfide.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.sulfide.Location = new System.Drawing.Point(88, 646);
+			this.sulfide.Name = "sulfide";
+			this.sulfide.RowTemplate.Height = 23;
+			this.sulfide.Size = new System.Drawing.Size(918, 137);
+			this.sulfide.TabIndex = 10;
+			// 
+			// label6
+			// 
+			this.label6.AutoSize = true;
+			this.label6.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label6.Location = new System.Drawing.Point(3, 801);
+			this.label6.Name = "label6";
+			this.label6.Size = new System.Drawing.Size(47, 19);
+			this.label6.TabIndex = 9;
+			this.label6.Text = "DS类";
+			// 
+			// label5
+			// 
+			this.label5.AutoSize = true;
+			this.label5.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label5.Location = new System.Drawing.Point(3, 646);
+			this.label5.Name = "label5";
+			this.label5.Size = new System.Drawing.Size(88, 19);
+			this.label5.TabIndex = 8;
+			this.label5.Text = "D硫化物类";
+			// 
+			// Gview_gzD
+			// 
+			this.Gview_gzD.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.Gview_gzD.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.Gview_gzD.Location = new System.Drawing.Point(88, 491);
+			this.Gview_gzD.Name = "Gview_gzD";
+			this.Gview_gzD.RowTemplate.Height = 23;
+			this.Gview_gzD.Size = new System.Drawing.Size(918, 137);
+			this.Gview_gzD.TabIndex = 7;
+			// 
+			// label4
+			// 
+			this.label4.AutoSize = true;
+			this.label4.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label4.Location = new System.Drawing.Point(3, 491);
+			this.label4.Name = "label4";
+			this.label4.Size = new System.Drawing.Size(37, 19);
+			this.label4.TabIndex = 6;
+			this.label4.Text = "D类";
+			// 
+			// Gview_gzC
+			// 
+			this.Gview_gzC.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.Gview_gzC.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.Gview_gzC.Location = new System.Drawing.Point(88, 336);
+			this.Gview_gzC.Name = "Gview_gzC";
+			this.Gview_gzC.RowTemplate.Height = 23;
+			this.Gview_gzC.Size = new System.Drawing.Size(918, 137);
+			this.Gview_gzC.TabIndex = 5;
+			// 
+			// label3
+			// 
+			this.label3.AutoSize = true;
+			this.label3.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label3.Location = new System.Drawing.Point(3, 336);
+			this.label3.Name = "label3";
+			this.label3.Size = new System.Drawing.Size(36, 19);
+			this.label3.TabIndex = 4;
+			this.label3.Text = "C类";
+			// 
+			// Gview_gzB
+			// 
+			this.Gview_gzB.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.Gview_gzB.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.Gview_gzB.Location = new System.Drawing.Point(88, 181);
+			this.Gview_gzB.Name = "Gview_gzB";
+			this.Gview_gzB.RowTemplate.Height = 23;
+			this.Gview_gzB.Size = new System.Drawing.Size(918, 137);
+			this.Gview_gzB.TabIndex = 3;
+			// 
+			// label2
+			// 
+			this.label2.AutoSize = true;
+			this.label2.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label2.Location = new System.Drawing.Point(3, 181);
+			this.label2.Name = "label2";
+			this.label2.Size = new System.Drawing.Size(36, 19);
+			this.label2.TabIndex = 2;
+			this.label2.Text = "B类";
+			// 
+			// label1
+			// 
+			this.label1.AutoSize = true;
+			this.label1.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this.label1.Location = new System.Drawing.Point(3, 26);
+			this.label1.Name = "label1";
+			this.label1.Size = new System.Drawing.Size(36, 19);
+			this.label1.TabIndex = 1;
+			this.label1.Text = "A类";
+			// 
+			// Gview_gzA
+			// 
+			this.Gview_gzA.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
+			this.Gview_gzA.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+			this.Gview_gzA.Location = new System.Drawing.Point(88, 26);
+			this.Gview_gzA.Name = "Gview_gzA";
+			this.Gview_gzA.RowTemplate.Height = 23;
+			this.Gview_gzA.Size = new System.Drawing.Size(918, 137);
+			this.Gview_gzA.TabIndex = 0;
+			// 
+			// NationalStandardMethodTwo
+			// 
+			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.AutoScroll = true;
+			this.Controls.Add(this.panel1);
+			this.Name = "NationalStandardMethodTwo";
+			this.Size = new System.Drawing.Size(1009, 1147);
+			this.Load += new System.EventHandler(this.NationalStandardMethodTwo_Load);
+			this.panel1.ResumeLayout(false);
+			this.panel1.PerformLayout();
+			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzDS)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.sulfide)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzD)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzC)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzB)).EndInit();
+			((System.ComponentModel.ISupportInitialize)(this.Gview_gzA)).EndInit();
+			this.ResumeLayout(false);
 
         }
 

+ 1 - 1
OTSIncAReportApp/1-UI/GBCalculate/NationalStandardMethodTwo.resx

@@ -121,7 +121,7 @@
   <data name="pictureBox1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAKoAAAAfCAYAAAB3cVZEAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
-        wQAADsEBuJFr7QAABhBJREFUeF7tmI1NZDEMhGmBGmiBHiiBGmiBDuiADqiACmiABuiAHvb0oTU3O2s7
+        vwAADr8BOAVTJAAABhBJREFUeF7tmI1NZDEMhGmBGmiBHiiBGmiBDuiADqiACmiABuiAHvb0oTU3O2s7
         eYvQ3ZMykgW8OI5/xk7urg4LCzvAIurCr+Lt7e3w+Ph4uLu7O1xdXZ3I7e3t4eHh4UtnhEXUhV8B5Lu5
         uTkjZyUQ+f39/bj7HEOifnx8pB1xfX399e35+fnw+fl51D4Ha53DdBX2OUeB05n+SJ6eno4W/gIf8BN/
         8Vv1+Zad77i/vz/ZxySoQJFCj/MuBXY4hxzp2eQTf15eXo6ap/AYZ4Q8KDRnrkeOu5qTT90zK/hd1aEk

+ 3 - 3
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/GBData.cs

@@ -68,9 +68,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             clr_prop.SetDataSourceId(Index);//
             clr_prop.SetCalTableType((int)CALCULATE_TABLE_TYPE.GB_Method1);
             clr_prop.SetType((int)DisplayPicutureType.AnalyzeDataTable);//table
-
-            var tbl = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetAllGBFields(clr_prop);
-            GB_Report.setResultGrid(m_otsreport_export.m_mbszclass, tbl);
+			
+			var tbl = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetAllGBFields(clr_prop);
+            GB_Report.setResultGrid(m_otsreport_export.m_mbszclass, tbl, datasourcelist[Index]);
 
 
             if (gb_1)

+ 3 - 1
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Export.cs

@@ -1345,7 +1345,9 @@ namespace OTSIncAReportApp
 		#endregion
 		private void button7_Click(object sender, EventArgs e)
         {
-            OTSReport_criterion criterion = new OTSReport_criterion(m_export_reporttemplate, GB_Report,this);
+
+			m_ReportApp.m_rstDataMgr.SetWorkingResultId(cbo_sjy.SelectedIndex);
+			OTSReport_criterion criterion = new OTSReport_criterion(m_export_reporttemplate, GB_Report,this);
             criterion.Sample_order = cbo_sjy.SelectedIndex;
             criterion.ShowDialog();
         }

+ 19 - 9
OTSIncAReportApp/1-UI/OTSReportExport/Template/GBTemplate.cs

@@ -15,19 +15,29 @@ namespace OTSIncAReportApp.ReportTemplate
     {
         string typeface = "微软雅黑";
         public OTSReport_Export m_otsreport_export;
-        float LowPlace = 1000f;
+        private frmReportApp m_ReportApp;
+		float LowPlace = 1000f;
         Hashtable table;
-        GBData m_export_reporttemplate;
+        //GBData m_export_reporttemplate;
         string logName = "";
         public GBReport(OTSReport_Export in_export, Hashtable a_table)
         {
             m_otsreport_export = in_export;
-            m_export_reporttemplate = new GBData(in_export);
-            InitializeComponent();
+            m_ReportApp = m_otsreport_export.m_ReportApp;
+			//m_export_reporttemplate = new GBData(in_export);
+			InitializeComponent();
 
             table = a_table;
         }
-        private void setXRLabelData(XRLabel cell, string str)
+		public GBReport(frmReportApp a_ReportApp, Hashtable a_table)
+		{
+			m_ReportApp = a_ReportApp;
+			//m_export_reporttemplate = new GBData(in_export);
+			InitializeComponent();
+
+			table = a_table;
+		}
+		private void setXRLabelData(XRLabel cell, string str)
         {
             cell.Text = str;
             cell.Font = new Font(typeface, cell.Font.Size);
@@ -338,18 +348,18 @@ namespace OTSIncAReportApp.ReportTemplate
         /// 首页部分数据插入
         /// </summary>
         /// <param name="m_mbszclass"></param>
-        public void setResultGrid(c_TemplateClass m_mbszclass, DataTable tb)
+        public void setResultGrid(c_TemplateClass m_mbszclass, DataTable tb,string a_CLJGMC)
         {
 
         
             #region 从Grid表中读取样品数据
             //------------------加载模块,获取数据-------------------------------------------------
-            ResultGrid ls_resultgrid = new ResultGrid(m_otsreport_export.m_ReportApp);
+            ResultGrid ls_resultgrid = new ResultGrid(m_ReportApp);
             Dictionary<string, string> keyValues_ResultGrid = ls_resultgrid.GetData_ResultGrid_Report();
             //------------------加载模块,获取数据结束----------------------------------------------
             Dictionary<string, string>.Enumerator en = keyValues_ResultGrid.GetEnumerator();
 
-            keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col1"].ToString(), out string str_CLJGMC);//测量结果名称
+            //keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col1"].ToString(), out string str_CLJGMC);//测量结果名称
             keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col4"].ToString(), out string str_YXSJ);//运行时间
             keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col5"].ToString(), out string str_SCZS);//视场总数
             keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col6"].ToString(), out string str_FLFA);//分类方案
@@ -358,7 +368,7 @@ namespace OTSIncAReportApp.ReportTemplate
             keyValues_ResultGrid.TryGetValue("Magnification", out string Magnification);//放大倍数
             #endregion
 
-            setXRLabelData(GB_dev_jcjgwj_text, str_CLJGMC);
+            setXRLabelData(GB_dev_jcjgwj_text, a_CLJGMC);
             setXRLabelData(GB_dev_yxsj_text, str_YXSJ);
             setXRLabelData(GB_dev_sczs_text, tb.Rows.Count.ToString());
             setXRLabelData(GB_dev_flfa_text, str_FLFA);