Jelajahi Sumber

更新优化颗粒列表,显示数量增加

zhangjiaxin 11 bulan lalu
induk
melakukan
d36b496fa1

+ 7 - 5
Bin/x64/Debug/Config/ReportTemplate/CleannessA_Template/ReportTemplateConfig.xml

@@ -12,8 +12,7 @@
     <str_xzkl>全部颗粒</str_xzkl>
     <int_xzkl>0</int_xzkl>
     <LOGName>ReportIdentification.bmp</LOGName>
-    <StandardLibraryName>
-    </StandardLibraryName>
+    <StandardLibraryName>OTS_TC_Axia_per.db</StandardLibraryName>
   </M_SY>
   <M_YMYJ>
     <str_tb_ymwb>锂电异物分析报告</str_tb_ymwb>
@@ -135,14 +134,17 @@
     <b_ck_chart>False</b_ck_chart>
   </M_JZWZB>
   <whole>
-    <list_str_MainPriority>System.Collections.Generic.List`1[System.String]</list_str_MainPriority>
+    <list_str_MainPriority>System.Collections.Generic.List`1[System.String]<YS0>Glass</YS0><YS1>Glass</YS1><YS2>Si Rich</YS2><YS3>Al-Alloy</YS3><YS4>Oxidized Al</YS4><YS5>Al2O3 with S</YS5><YS6>Al2O3</YS6><YS7>Al-Rich</YS7><YS8>SiO2</YS8><YS9>W Rich (W-C)</YS9><YS10>Aluminosilicates</YS10><YS11>Ca-Aluminosilicates</YS11><YS12>High Ca</YS12><YS13>Mn-P Coating</YS13><YS14>Cr Coating</YS14><YS15>Zn-Cr Coating</YS15><YS16>Zn Coating</YS16><YS17>Zn-P Coating</YS17><YS18>Zn-Cu</YS18><YS19>Steel</YS19><YS20>Steel</YS20><YS21>Steel</YS21><YS22>Steel</YS22><YS23>Flourinated</YS23><YS24>Brass</YS24><YS25>Bronze CuSn</YS25><YS26>Non-Ferrous Metal</YS26><YS27>Misc Salts</YS27><YS28>Mineral Fiber</YS28><YS29>Mineral</YS29><YS30>Al alloy -Cu</YS30><YS31>Misc Carbons</YS31></list_str_MainPriority>
     <list_str_SecondaryPriority>System.Collections.Generic.List`1[System.String]<YS0>Nialloy</YS0><YS1>Fe-O</YS1><YS2>Fe-Cr</YS2><YS3>Fe-alloy</YS3></list_str_SecondaryPriority>
-    <str_MainPriority>
-    </str_MainPriority>
+    <str_MainPriority>Glass , Glass , Si Rich , Al-Alloy , Oxidized Al , Al2O3 with S , Al2O3 , Al-Rich , SiO2 , W Rich (W-C) , Aluminosilicates , Ca-Aluminosilicates , High Ca , Mn-P Coating , Cr Coating , Zn-Cr Coating , Zn Coating , Zn-P Coating , Zn-Cu , Steel , Steel , Steel , Steel , Flourinated , Brass , Bronze CuSn , Non-Ferrous Metal , Misc Salts , Mineral Fiber , Mineral , Al alloy -Cu , Misc Carbons</str_MainPriority>
     <str_SecondaryPriority>Nialloy,Fe-O,Fe-Cr,Fe-alloy</str_SecondaryPriority>
+    <list_str_MainPriority_Serial>System.Collections.Generic.List`1[System.String]<YS0>40001</YS0><YS1>40002</YS1><YS2>40003</YS2><YS3>40004</YS3><YS4>40005</YS4><YS5>40006</YS5><YS6>40007</YS6><YS7>40008</YS7><YS8>40009</YS8><YS9>40010</YS9><YS10>40011</YS10><YS11>40012</YS11><YS12>40013</YS12><YS13>40014</YS13><YS14>40015</YS14><YS15>40016</YS15><YS16>40017</YS16><YS17>40018</YS17><YS18>40019</YS18><YS19>40020</YS19><YS20>40021</YS20><YS21>40022</YS21><YS22>40023</YS22><YS23>40024</YS23><YS24>40025</YS24><YS25>40026</YS25><YS26>40027</YS26><YS27>40028</YS27><YS28>40029</YS28><YS29>40030</YS29><YS30>40031</YS30><YS31>40033</YS31></list_str_MainPriority_Serial>
   </whole>
   <M_DZ>
     <Notes>
     </Notes>
   </M_DZ>
+  <M_VDA19>
+    <IsVDA19>False</IsVDA19>
+  </M_VDA19>
 </XmlConfig>

+ 1 - 2
Bin/x64/Debug/Config/ReportTemplate/Inca_Template/ReportTemplateConfig.xml

@@ -68,7 +68,7 @@
     </list_str_tb_yscf_ysxx>
   </M_YSFXJG>
   <M_SYXT>
-    <b_ck_syxt_xsmk>True</b_ck_syxt_xsmk>
+    <b_ck_syxt_xsmk>False</b_ck_syxt_xsmk>
     <index_cb_syxt_jsfs>0</index_cb_syxt_jsfs>
     <index_cb_syxt_klfw>0</index_cb_syxt_klfw>
     <str_cb_syxt_mhxssl>2</str_cb_syxt_mhxssl>
@@ -125,7 +125,6 @@
     </list_str_kllb_DeleteClass>
     <list_int_kllb_number>18</list_int_kllb_number>
     <list_str_kllb_DeleteClass_Serial>
-  
     </list_str_kllb_DeleteClass_Serial>
   </M_KLLBXX>
   <M_address>

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSProgMgrParam.pmf

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData RunMode="ProfessionalMode" SysType="TCCleannessA">
+<XMLData RunMode="ProfessionalMode" SysType="BatteryCleannessA">
   <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="NoSTDDB" SteelTechnology="0" UseSysSTD="true" />
   <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="0:AUTO" MatrixStep="50" OverlapParam="0" ParticleSelectionCondition="">
     <Member RegName="BGGray" end="255" start="80" />

+ 2 - 2
Bin/x64/Debug/Config/SysData/OTSReportMgrParam.rpf

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData systype="TCCleannessA">
+<XMLData systype="BatteryCleannessA">
   <Member RegName="Scale" strValue="1000" />
   <Member RegName="DefaultComputedColName" strValue="Area,EquivalentCircleDiameter,MaxDiameter,MinDiameter,DiameterRatio,FerretDiameter,PERP,PERI,INSCR,MEAN,ELONG,ASPECT_ELONG,Orientation" />
   <Member RegName="ElementsColName" strValue="C,O,Al,Fe,F,Ti,Na,Mn,Mg" />
-  <Member RegName="PartSizeFile" name="ljNuw.psf" />
+  <Member RegName="PartSizeFile" name="lj.psf" />
   <Member RegName="TRIO_CHART_TYPE" strValue="CaO.SiO₂.Al₂O₃" />
   <Member RegName="SIZE_CAL_METHOD_TYPE" strValue="DMAX" />
 </XMLData>

+ 1 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -874,7 +874,7 @@
 	  <Control name="col5" text="已检测视场总数" />
 	  <Control name="col6" text="分析标准库" />
 	  <Control name="col7" text="已检测特征" />
-	  <Control name="col8" text="总检测面积(μm" />
+	  <Control name="col8" text="总检测面积(mm" />
 	  <Control name="col9" text="已分析特征总面积 (μm" />
 	  <Control name="col10" text="特征/夹杂物指数" />
 	  <Control name="col11" text="纳入指数/比例因子" />

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -177,7 +177,7 @@ namespace OTSIncAReportGrids
             }
             keyValues.Add(table["col6"].ToString(), LibraryName);
             keyValues.Add(table["col7"].ToString(), fielddata.GetparticleCount().ToString());
-            keyValues.Add(table["col8"].ToString() + "\x00B2)", filedsArea.ToString());
+            keyValues.Add(table["col8"].ToString() + "\x00B2)",Math.Round(filedsArea,2).ToString());
             keyValues.Add(table["col9"].ToString()+ "\x00B2)", String.Format("{0:f2}", particleArea));
             keyValues.Add(table["col10"].ToString(), ratio.ToString());
 

+ 23 - 13
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/BasicData.cs

@@ -34,17 +34,17 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             SizeChart = ds.Tables[0].Rows[0]["Sizes"].ToString();
 
-            for (int i = 0; i < SizeChart.Split(',').Length - 1; i++)
+            for (int i = 0; i < SizeChart.Split(',').Length; i++)
             {
                 if (SizeChart.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(SizeChart.Split(',')[i]);
-                    double d2 = Convert.ToDouble(SizeChart.Split(',')[i + 1]);
-                    colid.Add(d1.ToString() + "~" + d2.ToString());
+                    //double d2 = Convert.ToDouble(SizeChart.Split(',')[i + 1]);
+                    colid.Add("≥"+ d1.ToString() /*+ "~" + d2.ToString()*/);
                 }
             }
-            double d = Convert.ToDouble(SizeChart.Split(',')[SizeChart.Split(',').Length - 1]);
-            colid.Add(d.ToString() + "~MAX");
+            //double d = Convert.ToDouble(SizeChart.Split(',')[SizeChart.Split(',').Length - 1]);
+            //colid.Add(d.ToString() + "~MAX");
         }
         /// <summary>
         /// 获取粒级表
@@ -64,17 +64,17 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile;
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
-            for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
+            for (int i = 0; i < sizestr.Split(',').Length; i++)
             {
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add(d1.ToString() + "~" + d2.ToString());
+                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
+                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
                 }
             }
-            double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            colid.Add(d.ToString() + "~MAX");
+            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
+            //colid.Add(d.ToString() + "~MAX");
 
             for (int i = 0; i < colid.Count; i++)
             {
@@ -118,12 +118,22 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr["Largest"] = Math.Round(Convert.ToDouble(dt.Rows[i]["max"]), 2);
                 for (int a = 6; a < colid.Count; a++)
                 {
-                    string d1 = colid[a].Split('~')[0];
-                    string d2 = colid[a].Split('~')[1];
-                    if (d2 == "MAX")
+                    string d1 = colid[a].Split('≥')[1];
+                    string d2;
+                    if (a== colid.Count-1)
                     {
                         d2 = "999";
                     }
+                    else
+                    {
+                        d2 = colid[a+1].Split('≥')[1];
+                    }
+                    
+                   
+                    //if (d2 == "MAX")
+                    //{
+                    //    d2 = "999";
+                    //}
                     DataRow[] datas = dtp.Select(getWhere(d2, d1, po, dt.Rows[i]["TypeId"].ToString()));
                     dr[colid[a]] = datas.Count();
                 }

+ 239 - 176
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/ParticleAnalysis.cs

@@ -28,41 +28,50 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
 
+            for (int i = 0; i < colid.Count; i++)
+            {
+                ls_partsize_dt.Columns.Add("c" + (i + 1).ToString());
+            }
+            //ls_partsize_dt.Columns.Add("c1");
+            //ls_partsize_dt.Columns.Add("c2");
+            //ls_partsize_dt.Columns.Add("c3");
+            //ls_partsize_dt.Columns.Add("c4");
+            //ls_partsize_dt.Columns.Add("c5");
+            //ls_partsize_dt.Columns.Add("c6");
+            //ls_partsize_dt.Columns.Add("c7");
+            //ls_partsize_dt.Columns.Add("c8");
+            //ls_partsize_dt.Columns.Add("c9");
+            DataTable ls_Particel_dt = new DataTable();
+            ls_Particel_dt.TableName = "Particel";
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 10; i++)
+            int colidCount = 1;
+            for (int i = 0; i < colid.Count; i++)
             {
                 if (colid.Count < i)
                 {
-                    dr["c" + i.ToString()] = "";
+                    dr["c" + (i + 1).ToString()] = "";
                 }
                 else
                 {
-                    dr["c" + i.ToString()] = colid[i - 1];
+                    dr["c" + (i + 1).ToString()] = colid[i];
+                    ls_Particel_dt.Columns.Add("c" + (i + 1).ToString(), typeof(double));
+                    colidCount++;
                 }
             }
             ls_partsize_dt.Rows.Add(dr);
 
-            DataTable ls_Particel_dt = new DataTable();
-            ls_Particel_dt.TableName = "Particel";
-            ls_Particel_dt.Columns.Add("c1", typeof(double));
-            ls_Particel_dt.Columns.Add("c2", typeof(double));
-            ls_Particel_dt.Columns.Add("c3", typeof(double));
-            ls_Particel_dt.Columns.Add("c4", typeof(double));
-            ls_Particel_dt.Columns.Add("c5", typeof(double));
-            ls_Particel_dt.Columns.Add("c6", typeof(double));
-            ls_Particel_dt.Columns.Add("c7", typeof(double));
-            ls_Particel_dt.Columns.Add("c8", typeof(double));
-            ls_Particel_dt.Columns.Add("c9", typeof(double));
+            //DataTable ls_Particel_dt = new DataTable();
+            //ls_Particel_dt.TableName = "Particel";
+            //ls_Particel_dt.Columns.Add("c1", typeof(double));
+            //ls_Particel_dt.Columns.Add("c2", typeof(double));
+            //ls_Particel_dt.Columns.Add("c3", typeof(double));
+            //ls_Particel_dt.Columns.Add("c4", typeof(double));
+            //ls_Particel_dt.Columns.Add("c5", typeof(double));
+            //ls_Particel_dt.Columns.Add("c6", typeof(double));
+            //ls_Particel_dt.Columns.Add("c7", typeof(double));
+            //ls_Particel_dt.Columns.Add("c8", typeof(double));
+            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -74,7 +83,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["Name"] = data.Rows[i]["TypeName"].ToString();
                 dr2["Class"] = data.Rows[i]["Class"].ToString();
                 dr2["TypeId"] = data.Rows[i]["TypeId"].ToString();//获取分类编号
-                for (int j = 1; j < 10; j++)
+                for (int j = 1; j < colidCount; j++)
                 {
                     if (colid.Count >= j)
                     {
@@ -86,7 +95,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr2["total"] = "0"; //求合
                     double d_total = 0;
 
-                    for (int j = 1; j < 10; j++)
+                    for (int j = 1; j < colidCount; j++)
                     {
                         if (colid.Count >= j)
                         {
@@ -126,43 +135,55 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             //------------------------------------------------
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
+
+            for (int i=0;i< colid.Count;i++)
+            {
+                ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
+            }
 
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 10; i++)
+            //for (int i = 1; i < 10; i++)
+            //{
+            //    if (colid.Count < i)
+            //    {
+            //        dr["c" + i.ToString()] = "";
+            //    }
+            //    else
+            //    {
+            //        dr["c" + i.ToString()] = colid[i - 1];
+            //    }
+            //}
+            //ls_partsize_dt.Rows.Add(dr);
+            DataTable ls_Particel_dt = new DataTable();
+            ls_Particel_dt.TableName = "Particel";
+            int colidCount = 1;
+            for (int i = 0; i < colid.Count; i++)
             {
                 if (colid.Count < i)
                 {
-                    dr["c" + i.ToString()] = "";
+                    dr["c" + (i + 1).ToString()] = "";
                 }
                 else
                 {
-                    dr["c" + i.ToString()] = colid[i - 1];
+                    dr["c" + (i + 1).ToString()] = colid[i];
+                    ls_Particel_dt.Columns.Add("c" + (i + 1).ToString(), typeof(double));
+                    colidCount++;
                 }
             }
-            ls_partsize_dt.Rows.Add(dr);
 
 
-            DataTable ls_Particel_dt = new DataTable();
-            ls_Particel_dt.TableName = "Particel";
+            //DataTable ls_Particel_dt = new DataTable();
+            //ls_Particel_dt.TableName = "Particel";
 
-            ls_Particel_dt.Columns.Add("c1", typeof(double));
-            ls_Particel_dt.Columns.Add("c2", typeof(double));
-            ls_Particel_dt.Columns.Add("c3", typeof(double));
-            ls_Particel_dt.Columns.Add("c4", typeof(double));
-            ls_Particel_dt.Columns.Add("c5", typeof(double));
-            ls_Particel_dt.Columns.Add("c6", typeof(double));
-            ls_Particel_dt.Columns.Add("c7", typeof(double));
-            ls_Particel_dt.Columns.Add("c8", typeof(double));
-            ls_Particel_dt.Columns.Add("c9", typeof(double));
+            //ls_Particel_dt.Columns.Add("c1", typeof(double));
+            //ls_Particel_dt.Columns.Add("c2", typeof(double));
+            //ls_Particel_dt.Columns.Add("c3", typeof(double));
+            //ls_Particel_dt.Columns.Add("c4", typeof(double));
+            //ls_Particel_dt.Columns.Add("c5", typeof(double));
+            //ls_Particel_dt.Columns.Add("c6", typeof(double));
+            //ls_Particel_dt.Columns.Add("c7", typeof(double));
+            //ls_Particel_dt.Columns.Add("c8", typeof(double));
+            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -174,7 +195,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["Name"] = data.Rows[i]["TypeName"].ToString();
                 dr2["Class"] = data.Rows[i]["Class"].ToString();
                 dr2["TypeId"] = data.Rows[i]["TypeId"].ToString();//获取分类编号
-                for (int j = 1; j < 10; j++)
+                for (int j = 1; j < colidCount; j++)
                 {
                     if (colid.Count >= j)
                     {
@@ -186,7 +207,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr2["total"] = "0"; //求合
                     double d_total = 0;
 
-                    for (int j = 1; j < 10; j++)
+                    for (int j = 1; j < colidCount; j++)
                     {
                         if (colid.Count >= j)
                         {
@@ -213,42 +234,53 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             //------------------------------------------------
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
+
+            for(int i=0;i< colid.Count;i++)
+            {
+                ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
+            }
+
+            //ls_partsize_dt.Columns.Add("c1");
+            //ls_partsize_dt.Columns.Add("c2");
+            //ls_partsize_dt.Columns.Add("c3");
+            //ls_partsize_dt.Columns.Add("c4");
+            //ls_partsize_dt.Columns.Add("c5");
+            //ls_partsize_dt.Columns.Add("c6");
+            //ls_partsize_dt.Columns.Add("c7");
+            //ls_partsize_dt.Columns.Add("c8");
+            //ls_partsize_dt.Columns.Add("c9");
 
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 10; i++)
+
+            DataTable ls_Particel_dt = new DataTable();
+            ls_Particel_dt.TableName = "Particel";
+            int colidCount = 1;
+            for (int i = 0; i < colid.Count; i++)
             {
                 if (colid.Count < i)
                 {
-                    dr["c" + i.ToString()] = "";
+                    dr["c" + (i+1).ToString()] = "";
                 }
                 else
                 {
-                    dr["c" + i.ToString()] = colid[i - 1];
+                    dr["c" + (i + 1).ToString()] = colid[i];
+                    ls_Particel_dt.Columns.Add("c" + (i + 1).ToString(), typeof(double));
+                    colidCount++;
                 }
             }
             ls_partsize_dt.Rows.Add(dr);
 
 
-            DataTable ls_Particel_dt = new DataTable();
-            ls_Particel_dt.TableName = "Particel";
-            ls_Particel_dt.Columns.Add("c1", typeof(double));
-            ls_Particel_dt.Columns.Add("c2", typeof(double));
-            ls_Particel_dt.Columns.Add("c3", typeof(double));
-            ls_Particel_dt.Columns.Add("c4", typeof(double));
-            ls_Particel_dt.Columns.Add("c5", typeof(double));
-            ls_Particel_dt.Columns.Add("c6", typeof(double));
-            ls_Particel_dt.Columns.Add("c7", typeof(double));
-            ls_Particel_dt.Columns.Add("c8", typeof(double));
-            ls_Particel_dt.Columns.Add("c9", typeof(double));
+            
+            //ls_Particel_dt.Columns.Add("c1", typeof(double));
+            //ls_Particel_dt.Columns.Add("c2", typeof(double));
+            //ls_Particel_dt.Columns.Add("c3", typeof(double));
+            //ls_Particel_dt.Columns.Add("c4", typeof(double));
+            //ls_Particel_dt.Columns.Add("c5", typeof(double));
+            //ls_Particel_dt.Columns.Add("c6", typeof(double));
+            //ls_Particel_dt.Columns.Add("c7", typeof(double));
+            //ls_Particel_dt.Columns.Add("c8", typeof(double));
+            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -260,7 +292,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["Name"] = data.Rows[i]["TypeName"].ToString();
                 dr2["Class"] = data.Rows[i]["Class"].ToString();
                 dr2["TypeId"] = data.Rows[i]["TypeId"].ToString();//获取分类编号
-                for (int j = 1; j < 10; j++)
+                for (int j = 1; j < colidCount; j++)
                 {
                     if (colid.Count >= j)
                     {
@@ -272,7 +304,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr2["total"] = "0"; //求合
                     double d_total = 0;
 
-                    for (int j = 1; j < 10; j++)
+                    for (int j = 1; j < colidCount; j++)
                     {
                         if (colid.Count >= j)
                         {
@@ -307,7 +339,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
 
             //获取大分类信息
             DataTable dt = QuantityOfIntegratedSubstances(ls_Particel_dt, ClassName);
-            DataTable data2 = classIfIcationSort(ls_Particel_dt, ClassName, dt);
+            DataTable data2 = classIfIcationSort(ls_Particel_dt, ClassName, dt, colidCount);
             datas.Add(ls_partsize_dt.Copy());
             datas.Add(data2.Copy());
             return datas;
@@ -327,43 +359,51 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             //------------------------------------------------
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
+            for (int i = 0; i < colid.Count; i++)
+            {
+                ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
+            }
+            //ls_partsize_dt.Columns.Add("c1");
+            //ls_partsize_dt.Columns.Add("c2");
+            //ls_partsize_dt.Columns.Add("c3");
+            //ls_partsize_dt.Columns.Add("c4");
+            //ls_partsize_dt.Columns.Add("c5");
+            //ls_partsize_dt.Columns.Add("c6");
+            //ls_partsize_dt.Columns.Add("c7");
+            //ls_partsize_dt.Columns.Add("c8");
+            //ls_partsize_dt.Columns.Add("c9");
 
+            DataTable ls_Particel_dt = new DataTable();
+            ls_Particel_dt.TableName = "Particel";
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 10; i++)
+            int colidCount = 1;
+            for (int i = 0; i < colid.Count; i++)
             {
                 if (colid.Count < i)
                 {
-                    dr["c" + i.ToString()] = "";
+                    dr["c" + (i + 1).ToString()] = "";
                 }
                 else
                 {
-                    dr["c" + i.ToString()] = colid[i - 1];
+                    dr["c" + (i + 1).ToString()] = colid[i];
+                    ls_Particel_dt.Columns.Add("c" + (i + 1).ToString(), typeof(double));
+                    colidCount++;
                 }
             }
             ls_partsize_dt.Rows.Add(dr);
 
 
-            DataTable ls_Particel_dt = new DataTable();
-            ls_Particel_dt.TableName = "Particel";
+          
 
-            ls_Particel_dt.Columns.Add("c1", typeof(double));
-            ls_Particel_dt.Columns.Add("c2", typeof(double));
-            ls_Particel_dt.Columns.Add("c3", typeof(double));
-            ls_Particel_dt.Columns.Add("c4", typeof(double));
-            ls_Particel_dt.Columns.Add("c5", typeof(double));
-            ls_Particel_dt.Columns.Add("c6", typeof(double));
-            ls_Particel_dt.Columns.Add("c7", typeof(double));
-            ls_Particel_dt.Columns.Add("c8", typeof(double));
-            ls_Particel_dt.Columns.Add("c9", typeof(double));
+            //ls_Particel_dt.Columns.Add("c1", typeof(double));
+            //ls_Particel_dt.Columns.Add("c2", typeof(double));
+            //ls_Particel_dt.Columns.Add("c3", typeof(double));
+            //ls_Particel_dt.Columns.Add("c4", typeof(double));
+            //ls_Particel_dt.Columns.Add("c5", typeof(double));
+            //ls_Particel_dt.Columns.Add("c6", typeof(double));
+            //ls_Particel_dt.Columns.Add("c7", typeof(double));
+            //ls_Particel_dt.Columns.Add("c8", typeof(double));
+            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -375,7 +415,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["Name"] = data.Rows[i]["TypeName"].ToString();
                 dr2["Class"] = data.Rows[i]["Class"].ToString();
                 dr2["TypeId"] = data.Rows[i]["TypeId"].ToString();//获取分类编号
-                for (int j = 1; j < 10; j++)
+                for (int j = 1; j < colidCount; j++)
                 {
                     if (colid.Count >= j)
                     {
@@ -387,7 +427,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr2["total"] = "0"; //求合
                     double d_total = 0;
 
-                    for (int j = 1; j < 10; j++)
+                    for (int j = 1; j < colidCount; j++)
                     {
                         if (colid.Count >= j)
                         {
@@ -446,62 +486,71 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile;
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
-            for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
+            for (int i = 0; i < sizestr.Split(',').Length; i++)
             {
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add(d1.ToString() + "~" + d2.ToString());
+                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
+                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
                 }
             }
 
-            double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            colid.Add(d.ToString() + "~MAX");
+            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
+            //colid.Add(d.ToString() + "~MAX");
             ParticleData fielddata = new ParticleData(m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.GetWorkingResultId()].FilePath);
 
 
             //------------------------------------------------
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
-            ls_partsize_dt.Columns.Add("c10");
+            for(int i=0;i< colid.Count;i++)
+            {
+                ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
+            }
+            //ls_partsize_dt.Columns.Add("c1");
+            //ls_partsize_dt.Columns.Add("c2");
+            //ls_partsize_dt.Columns.Add("c3");
+            //ls_partsize_dt.Columns.Add("c4");
+            //ls_partsize_dt.Columns.Add("c5");
+            //ls_partsize_dt.Columns.Add("c6");
+            //ls_partsize_dt.Columns.Add("c7");
+            //ls_partsize_dt.Columns.Add("c8");
+            //ls_partsize_dt.Columns.Add("c9");
+            //ls_partsize_dt.Columns.Add("c10");
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 10; i++)
+            DataTable ls_Particel_dt = new DataTable();
+            ls_Particel_dt.TableName = "Particel";
+            int colidCount = 1;
+            for (int i = 0; i < colid.Count; i++)
             {
-                if (colid.Count < i)
-                {
-                    dr["c" + i.ToString()] = "";
-                }
-                else
-                {
-                    dr["c" + i.ToString()] = colid[i - 1];
-                }
+                //if (colid.Count < i)
+                //{
+                //    dr["c" + i.ToString()] = "";
+                //}
+                //else
+                //{
+                    dr["c" + (i+1).ToString()] = colid[i];
+                //}
+
+                ls_Particel_dt.Columns.Add("c"+ (i + 1).ToString());
+                colidCount++;
             }
             ls_partsize_dt.Rows.Add(dr);
 
 
-            DataTable ls_Particel_dt = new DataTable();
-            ls_Particel_dt.TableName = "Particel";
+            
 
-            ls_Particel_dt.Columns.Add("c1");
-            ls_Particel_dt.Columns.Add("c2");
-            ls_Particel_dt.Columns.Add("c3");
-            ls_Particel_dt.Columns.Add("c4");
-            ls_Particel_dt.Columns.Add("c5");
-            ls_Particel_dt.Columns.Add("c6");
-            ls_Particel_dt.Columns.Add("c7");
-            ls_Particel_dt.Columns.Add("c8");
-            ls_Particel_dt.Columns.Add("c9");
-            ls_Particel_dt.Columns.Add("c10");
+            
+            //ls_Particel_dt.Columns.Add("c2");
+            //ls_Particel_dt.Columns.Add("c3");
+            //ls_Particel_dt.Columns.Add("c4");
+            //ls_Particel_dt.Columns.Add("c5");
+            //ls_Particel_dt.Columns.Add("c6");
+            //ls_Particel_dt.Columns.Add("c7");
+            //ls_Particel_dt.Columns.Add("c8");
+            //ls_Particel_dt.Columns.Add("c9");
+            //ls_Particel_dt.Columns.Add("c10");
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total");
             ls_Particel_dt.Columns.Add("TypeId");
@@ -513,7 +562,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr2["Name"] = data.Rows[i]["TypeName"].ToString();
 
                 dr2["TypeId"] = data.Rows[i]["TypeId"].ToString();//获取分类编号
-                for (int j = 1; j < 11; j++)
+                for (int j = 1; j < colidCount; j++)
                 {
                     if (colid.Count >= j)
                     {
@@ -529,7 +578,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr2["total"] = " "; //求合
                     double d_total = 0;
 
-                    for (int j = 1; j < 11; j++)
+                    for (int j = 1; j < colidCount; j++)
                     {
                         if (colid.Count >= j)
                         {
@@ -556,44 +605,49 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile;
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
-            for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
+            for (int i = 0; i < sizestr.Split(',').Length; i++)
             {
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add(d1.ToString() + "~" + d2.ToString());
+                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
+                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
                 }
             }
-            double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            colid.Add(d.ToString() + "~MAX");
+            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
+            //colid.Add(d.ToString() + "~MAX");
 
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
-            ls_partsize_dt.Columns.Add("c1");
-            ls_partsize_dt.Columns.Add("c2");
-            ls_partsize_dt.Columns.Add("c3");
-            ls_partsize_dt.Columns.Add("c4");
-            ls_partsize_dt.Columns.Add("c5");
-            ls_partsize_dt.Columns.Add("c6");
-            ls_partsize_dt.Columns.Add("c7");
-            ls_partsize_dt.Columns.Add("c8");
-            ls_partsize_dt.Columns.Add("c9");
-            ls_partsize_dt.Columns.Add("c10");
-            ls_partsize_dt.Columns.Add("c11");
-            ls_partsize_dt.Columns.Add("c12");
+
+            for (int i=0;i< colid.Count;i++)
+            {
+                ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
+            }
+            //ls_partsize_dt.Columns.Add("c1");
+            //ls_partsize_dt.Columns.Add("c2");
+            //ls_partsize_dt.Columns.Add("c3");
+            //ls_partsize_dt.Columns.Add("c4");
+            //ls_partsize_dt.Columns.Add("c5");
+            //ls_partsize_dt.Columns.Add("c6");
+            //ls_partsize_dt.Columns.Add("c7");
+            //ls_partsize_dt.Columns.Add("c8");
+            //ls_partsize_dt.Columns.Add("c9");
+            //ls_partsize_dt.Columns.Add("c10");
+            //ls_partsize_dt.Columns.Add("c11");
+            //ls_partsize_dt.Columns.Add("c12");
 
             DataRow dr = ls_partsize_dt.NewRow();
-            for (int i = 1; i < 13; i++)
+            for (int i = 0; i < colid.Count; i++)
             {
-                if (colid.Count < i)
-                {
-                    dr["c" + i.ToString()] = "";
-                }
-                else
-                {
-                    dr["c" + i.ToString()] = colid[i - 1];
-                }
+                //if (colid.Count < i)
+                //{
+                //    dr["c" + i.ToString()] = "";
+                //}
+                //else
+                //{
+                    dr["c" + (i+1).ToString()] = colid[i];
+                //}
             }
             ls_partsize_dt.Rows.Add(dr);
 
@@ -654,7 +708,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             }
             return dt_Class;
         }
-        private DataTable classIfIcationSort(DataTable dataTable, List<string> ClassName, DataTable data)
+        private DataTable classIfIcationSort(DataTable dataTable, List<string> ClassName, DataTable data,int colidCount)
         {
             DataTable dt = new DataTable();
             dt = dataTable.Copy();
@@ -670,7 +724,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 {
                     if (data.Rows[a]["Class"].ToString() == ClassName[i].ToString())
                     {
-                        for (int b = 1; b < 10; b++)
+                        for (int b = 1; b < colidCount; b++)
                         {
                             data1.Rows[0]["c" + b.ToString()] = data.Rows[a]["c" + b.ToString()];
                         }
@@ -737,17 +791,17 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile;
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
-            for (int i = 0; i < sizestr.Split(',').Length - 1; i++)
+            for (int i = 0; i < sizestr.Split(',').Length /*- 1*/; i++)
             {
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add(d1.ToString() + "~" + d2.ToString());
+                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
+                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
                 }
             }
-            double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            colid.Add(d.ToString() + "~MAX");
+            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
+            //colid.Add(d.ToString() + "~MAX");
 
             for (int i = 0; i < colid.Count; i++)
             {
@@ -791,12 +845,21 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 dr["Largest"] = Math.Round(Convert.ToDouble(dt.Rows[i]["max"]), 2);
                 for (int a = 6; a < colid.Count; a++)
                 {
-                    string d1 = colid[a].Split('~')[0];
-                    string d2 = colid[a].Split('~')[1];
-                    if (d2 == "MAX")
+                    string d2;
+                    if (a== colid.Count-1)
                     {
                         d2 = "999";
                     }
+                    else
+                    {
+                        d2 = colid[a+1].Split('≥')[1];
+                    }
+                    string d1 = colid[a].Split('≥')[1];
+                    //string d2 = colid[a].Split('~')[1];
+                    //if (d2 == "MAX")
+                    //{
+                    //    d2 = "999";
+                    //}
                     DataRow[] datas = dtp.Select(getWhere(d2, d1, po, dt.Rows[i]["TypeId"].ToString()));
                     dr[colid[a]] = datas.Count();
                 }

+ 323 - 144
OTSIncAReportApp/1-UI/OTSReportExport/Template/DataTemplate.cs

@@ -228,13 +228,40 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrChart_ParticelSizeCalss.Visible = true;
             xrChart_ParticelSizeSubdivision.Visible = true;
             List<List<ParticleSizeDEVData>> list_ParticelSizeData = new List<List<ParticleSizeDEVData>>();
-        
 
+            List<List<string>> llstr = new List<List<string>>();
+            for (int i = 0; i < CompositeData[1].Rows.Count; i++)
+            {
+                List<string> strings = new List<string>();
+                for (int a = 0; a < CompositeData[1].Columns.Count - 4; a++)
+                {
+                    strings.Add(CompositeData[1].Rows[i][a].ToString());
+                }
+                llstr.Add(strings);
+            }
+            List<List<string>> llwrite = new List<List<string>>();
+            for (int i = 0; i < llstr.Count; i++)
+            {
+                List<string> strings = new List<string>();
+                for (int a = 0; a < 12; a++)
+                {
+                    if (llstr[i].Count <= a)
+                    {
+                        strings.Add("0");
+                    }
+                    else
+                    {
+                        strings.Add(llstr[i][a]);
+                    }
+                }
+                llwrite.Add(strings);
+            }
 
             for (int i = 0; i < CompositeData[1].Rows.Count; i++)
             {
-                list_ParticelSizeData.Add(switch_ParticleSize(subscript.Getsubscriptstring(CompositeData[1].Rows[i]["Class"].ToString()), subscript.Getsubscriptstring(CompositeData[1].Rows[i]["Name"].ToString()), CompositeData[1].Rows[i]["total"].ToString(), CompositeData[1].Rows[i]["c1"].ToString(), CompositeData[1].Rows[i]["c2"].ToString(), CompositeData[1].Rows[i]["c3"].ToString(),
-                    CompositeData[1].Rows[i]["c4"].ToString(), CompositeData[1].Rows[i]["c5"].ToString(), CompositeData[1].Rows[i]["c6"].ToString(), CompositeData[1].Rows[i]["c7"].ToString()));
+                list_ParticelSizeData.Add(switch_ParticleSize(subscript.Getsubscriptstring(CompositeData[1].Rows[i]["Class"].ToString()), subscript.Getsubscriptstring(CompositeData[1].Rows[i]["Name"].ToString()), CompositeData[1].Rows[i]["total"].ToString(),
+                    llwrite[i][0], llwrite[i][1], llwrite[i][2],llwrite[i][3],llwrite[i][4],llwrite[i][5],llwrite[i][6],
+                    llwrite[i][7], llwrite[i][8], llwrite[i][9], llwrite[i][10], llwrite[i][11]));
             }
             setXRLabelData(xrTa_ParticleSizeTable.Rows[2].Cells[0], GetlanguageData("dev_classify", "分类"));//分类
             setXRLabelData(xrTa_ParticleSizeTable.Rows[2].Cells[1], GetlanguageData("dev_subdivision",  "二级分类"));//二级分类(子分类)
@@ -250,13 +277,17 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTa_ParticleSizeTable.Rows[2].Cells[1].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[2].Cells[1].Font.Size);
             //dev_quantity.Text = "数量";
             xrTa_ParticleSizeTable.Rows[2].Cells[2].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[2].Cells[2].Font.Size);
-            xrTa_ParticleSizeTable.Rows[2].Cells[3].Text = CompositeData[0].Rows[0]["c1"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[4].Text = CompositeData[0].Rows[0]["c2"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[5].Text = CompositeData[0].Rows[0]["c3"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[6].Text = CompositeData[0].Rows[0]["c4"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[7].Text = CompositeData[0].Rows[0]["c5"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[8].Text = CompositeData[0].Rows[0]["c6"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[9].Text = CompositeData[0].Rows[0]["c7"].ToString();
+            for (int i=0;i< CompositeData[0].Columns.Count;i++)
+            {
+                xrTa_ParticleSizeTable.Rows[2].Cells[i+3].Text = CompositeData[0].Rows[0]["c"+(i+1).ToString()].ToString();
+            }
+            //xrTa_ParticleSizeTable.Rows[2].Cells[3].Text = CompositeData[0].Rows[0]["c1"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[4].Text = CompositeData[0].Rows[0]["c2"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[5].Text = CompositeData[0].Rows[0]["c3"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[6].Text = CompositeData[0].Rows[0]["c4"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[7].Text = CompositeData[0].Rows[0]["c5"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[8].Text = CompositeData[0].Rows[0]["c6"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[9].Text = CompositeData[0].Rows[0]["c7"].ToString();
             xrTa_ParticleSizeTable.Rows[1].Cells[0].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Text = xrTa_ParticleSizeTable.Rows[1].Cells[0].Text + ComputeModeName + "(μm)";
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[1].Cells[0].Font.Size);
@@ -274,6 +305,14 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 XRTableCell tCell_size_5 = new XRTableCell();
                 XRTableCell tCell_size_6 = new XRTableCell();
                 XRTableCell tCell_size_7 = new XRTableCell();
+
+                XRTableCell tCell_size_8 = new XRTableCell();
+                XRTableCell tCell_size_9 = new XRTableCell();
+                XRTableCell tCell_size_10 = new XRTableCell();
+                XRTableCell tCell_size_11 = new XRTableCell();
+                XRTableCell tCell_size_12 = new XRTableCell();
+
+
                 tCell_Class.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[0].WidthF;
                 tCell_Name.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[1].WidthF;
                 tCell_total.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[2].WidthF;
@@ -285,6 +324,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 tCell_size_6.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[8].WidthF;
                 tCell_size_7.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[9].WidthF;
 
+                tCell_size_8.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[10].WidthF;
+                tCell_size_9.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[11].WidthF;
+                tCell_size_10.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[12].WidthF;
+                tCell_size_11.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[13].WidthF;
+                tCell_size_12.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[14].WidthF;
+
                 XRTableCellData(row, tCell_Class, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_Class");
                 XRTableCellData(row, tCell_Name, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_Name");
                 XRTableCellData(row, tCell_total, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_total");
@@ -295,6 +340,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 XRTableCellData(row, tCell_size_5, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_5");
                 XRTableCellData(row, tCell_size_6, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_6");
                 XRTableCellData(row, tCell_size_7, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_7");
+
+                XRTableCellData(row, tCell_size_8, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_8");
+                XRTableCellData(row, tCell_size_9, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_9");
+                XRTableCellData(row, tCell_size_10, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_10");
+                XRTableCellData(row, tCell_size_11, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_11");
+                XRTableCellData(row, tCell_size_12, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_12");
                 xrTa_ParticleSizeTable.Rows.Add(row);
 
                 if (CompositeData[1].Rows[i]["Name"].ToString()!="")
@@ -310,28 +361,22 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 
             XRTable xrTable3 = add_particleSizeS_end();
             xrTable3.LocationF = new PointF(10f, xrTa_ParticleSizeTable.LocationF.Y + xrTa_ParticleSizeTable.HeightF);
-            
+
             List<int> vs = new List<int>();
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            
+            for (int i = 0; i < surface_dt2.Columns.Count - 4; i++)
+            {
+                vs.Add(0);
+            }
+
             for (int i = 0; i < surface_dt2.Rows.Count; i++)
             {
-                for (int a = 1; a < 10; a++)
+                for (int a = 0; a < CompositeData[0].Columns.Count; a++)
                 {
-                    if (surface_dt2.Rows[i]["c" + a.ToString()] != " " && surface_dt2.Rows[i]["c" + a.ToString()] != "" && surface_dt2.Rows[i]["c" + a.ToString()] != null)
+                    if ( surface_dt2.Rows[i]["c" + (a+1).ToString()] != null)
                     {
-                        bool isNumeric = double.TryParse(surface_dt2.Rows[i]["c" + a.ToString()].ToString(), out double result);
+                        bool isNumeric = double.TryParse(surface_dt2.Rows[i]["c" + (a + 1).ToString()].ToString(), out double result);
                         if (isNumeric)
-                            vs[a - 1] += Convert.ToInt32(result);
+                            vs[a] += Convert.ToInt32(result);
                     }
                 }
                 //total += Convert.ToInt32(surface_dt2.Rows[i]["total"]);
@@ -341,20 +386,27 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTable3.Rows[0].Cells[0].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             xrTable3.Rows[0].Cells[1].Text = total.ToString();
             xrTable3.Rows[0].Cells[1].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[2].Text = vs[0].ToString();
-            xrTable3.Rows[0].Cells[2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[3].Text = vs[1].ToString();
-            xrTable3.Rows[0].Cells[3].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[4].Text = vs[2].ToString();
-            xrTable3.Rows[0].Cells[4].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[5].Text = vs[3].ToString();
-            xrTable3.Rows[0].Cells[5].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[6].Text = vs[4].ToString();
-            xrTable3.Rows[0].Cells[6].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[7].Text = vs[5].ToString();
-            xrTable3.Rows[0].Cells[7].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[8].Text = vs[6].ToString();
-            xrTable3.Rows[0].Cells[8].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+
+            for(int i=0;i< vs.Count;i++)
+            {
+                xrTable3.Rows[0].Cells[i+2].Text = vs[i].ToString();
+                xrTable3.Rows[0].Cells[i + 2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            }
+
+            //xrTable3.Rows[0].Cells[2].Text = vs[0].ToString();
+            //xrTable3.Rows[0].Cells[2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[3].Text = vs[1].ToString();
+            //xrTable3.Rows[0].Cells[3].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[4].Text = vs[2].ToString();
+            //xrTable3.Rows[0].Cells[4].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[5].Text = vs[3].ToString();
+            //xrTable3.Rows[0].Cells[5].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[6].Text = vs[4].ToString();
+            //xrTable3.Rows[0].Cells[6].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[7].Text = vs[5].ToString();
+            //xrTable3.Rows[0].Cells[7].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[8].Text = vs[6].ToString();
+            //xrTable3.Rows[0].Cells[8].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             NeueStartposition = xrTable3.LocationF.Y + xrTable3.SizeF.Height + 1;
 
             this.Detail.Controls.Add(xrTable3);
@@ -368,17 +420,54 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrChart_ParticelSizeCalss.Visible = true;
             xrChart_ParticelSizeSubdivision.Visible = true;
             List<List<ParticleSizeDEVData>> list_ParticelSizeData = new List<List<ParticleSizeDEVData>>();
-            int ls = 0;
+            //int ls = 0;
             DataTable REORDER_data = REORDER(surface_dt2, "TypeId");
+
+            List<List<string>> llstr = new List<List<string>>();
+            for (int i=0;i< REORDER_data.Rows.Count;i++)
+            {
+                if (REORDER_data.Rows[i]["Name"].ToString() == "" || REORDER_data.Rows[i]["Name"].ToString() == null)
+                {
+                    //ls = i;
+                    continue;
+                }
+
+                List<string> strings = new List<string>();
+                for (int a = 0; a < REORDER_data.Columns.Count - 4; a++)
+                {
+                    strings.Add(REORDER_data.Rows[i][a].ToString());
+                }
+                llstr.Add(strings);
+            }
+            List<List<string>> llwrite = new List<List<string>>();
+            for (int i=0;i< llstr.Count;i++)
+            {
+                List<string> strings = new List<string>();
+                for (int a = 0; a < 12; a++)
+                {
+                    if (llstr[i].Count <= a)
+                    {
+                        strings.Add("0");
+                    }
+                    else
+                    {
+                        strings.Add(llstr[i][a]);
+                    }
+                }
+                llwrite.Add(strings);
+            }
+
             for (int i = 0; i < REORDER_data.Rows.Count; i++)
             {
                 if (REORDER_data.Rows[i]["Name"].ToString() == "" || REORDER_data.Rows[i]["Name"].ToString() == null)
                 {
-                    ls = i;
+                    //ls = i;
                     continue;
                 }
-                list_ParticelSizeData.Add(switch_ParticleSize(subscript.Getsubscriptstring(REORDER_data.Rows[i]["Class"].ToString()), subscript.Getsubscriptstring(REORDER_data.Rows[i]["Name"].ToString()), REORDER_data.Rows[i]["total"].ToString(), REORDER_data.Rows[i]["c1"].ToString(), REORDER_data.Rows[i]["c2"].ToString(), REORDER_data.Rows[i]["c3"].ToString(),
-                   REORDER_data.Rows[i]["c4"].ToString(), REORDER_data.Rows[i]["c5"].ToString(), REORDER_data.Rows[i]["c6"].ToString(), REORDER_data.Rows[i]["c7"].ToString()));
+                list_ParticelSizeData.Add(switch_ParticleSize(subscript.Getsubscriptstring(REORDER_data.Rows[i]["Class"].ToString()), subscript.Getsubscriptstring(REORDER_data.Rows[i]["Name"].ToString()), REORDER_data.Rows[i]["total"].ToString(),
+                    llwrite[i][0], llwrite[i][1], llwrite[i][2],llwrite[i][3], llwrite[i][4],
+                   llwrite[i][5], llwrite[i][6], llwrite[i][7], llwrite[i][8], llwrite[i][9], 
+                   llwrite[i][10], llwrite[i][11]));
             }
   
             setXRLabelData(xrTa_ParticleSizeTable.Rows[2].Cells[0], GetlanguageData("dev_classify", "分类"));//二级分类(子分类)
@@ -391,13 +480,17 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTa_ParticleSizeTable.Rows[2].Cells[0].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[2].Cells[0].Font.Size);
             //dev_quantity.Text = "数量";
             xrTa_ParticleSizeTable.Rows[2].Cells[1].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[2].Cells[1].Font.Size);
-            xrTa_ParticleSizeTable.Rows[2].Cells[2].Text = CompositeData[0].Rows[0]["c1"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[3].Text = CompositeData[0].Rows[0]["c2"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[4].Text = CompositeData[0].Rows[0]["c3"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[5].Text = CompositeData[0].Rows[0]["c4"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[6].Text = CompositeData[0].Rows[0]["c5"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[7].Text = CompositeData[0].Rows[0]["c6"].ToString();
-            xrTa_ParticleSizeTable.Rows[2].Cells[8].Text = CompositeData[0].Rows[0]["c7"].ToString();
+            for(int i=0;i< CompositeData[0].Columns.Count;i++)
+            {
+                xrTa_ParticleSizeTable.Rows[2].Cells[i+2].Text= CompositeData[0].Rows[0]["c"+(i+1).ToString()].ToString();
+            }
+            //xrTa_ParticleSizeTable.Rows[2].Cells[2].Text = CompositeData[0].Rows[0]["c1"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[3].Text = CompositeData[0].Rows[0]["c2"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[4].Text = CompositeData[0].Rows[0]["c3"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[5].Text = CompositeData[0].Rows[0]["c4"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[6].Text = CompositeData[0].Rows[0]["c5"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[7].Text = CompositeData[0].Rows[0]["c6"].ToString();
+            //xrTa_ParticleSizeTable.Rows[2].Cells[8].Text = CompositeData[0].Rows[0]["c7"].ToString();
             xrTa_ParticleSizeTable.Rows[1].Cells[0].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Text = xrTa_ParticleSizeTable.Rows[1].Cells[0].Text + ComputeModeName + "(μm)";
             xrTa_ParticleSizeTable.Rows[1].Cells[0].Font = new Font(Schriftart_chinese, xrTa_ParticleSizeTable.Rows[1].Cells[0].Font.Size);
@@ -415,7 +508,14 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 XRTableCell tCell_size_5 = new XRTableCell();
                 XRTableCell tCell_size_6 = new XRTableCell();
                 XRTableCell tCell_size_7 = new XRTableCell();
-                
+
+
+                XRTableCell tCell_size_8 = new XRTableCell();
+                XRTableCell tCell_size_9 = new XRTableCell();
+                XRTableCell tCell_size_10 = new XRTableCell();
+                XRTableCell tCell_size_11 = new XRTableCell();
+                XRTableCell tCell_size_12 = new XRTableCell();
+
                 tCell_Name.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[0].WidthF;
                 tCell_total.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[1].WidthF;
                 tCell_size_1.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[2].WidthF;
@@ -426,7 +526,11 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 tCell_size_6.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[7].WidthF;
                 tCell_size_7.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[8].WidthF;
 
-             
+                tCell_size_8.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[9].WidthF;
+                tCell_size_9.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[10].WidthF;
+                tCell_size_10.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[11].WidthF;
+                tCell_size_11.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[12].WidthF;
+                tCell_size_12.WidthF = xrTa_ParticleSizeTable.Rows[2].Cells[13].WidthF;
                 XRTableCellData(row, tCell_Name, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_Name");
                 XRTableCellData(row, tCell_total, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_total");
                 XRTableCellData(row, tCell_size_1, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_1");
@@ -436,6 +540,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 XRTableCellData(row, tCell_size_5, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_5");
                 XRTableCellData(row, tCell_size_6, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_6");
                 XRTableCellData(row, tCell_size_7, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_7");
+
+                XRTableCellData(row, tCell_size_8, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_8");
+                XRTableCellData(row, tCell_size_9, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_9");
+                XRTableCellData(row, tCell_size_10, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_10");
+                XRTableCellData(row, tCell_size_11, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_11");
+                XRTableCellData(row, tCell_size_12, Schriftart_english, DevExpress.XtraPrinting.TextAlignment.MiddleCenter, "Text", list_ParticelSizeData[i], "size_12");
                 xrTa_ParticleSizeTable.Rows.Add(row);
 
             }
@@ -446,26 +556,21 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTable3.LocationF = new PointF(10f, xrTa_ParticleSizeTable.LocationF.Y + xrTa_ParticleSizeTable.HeightF);
 
             List<int> vs = new List<int>();
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
-            vs.Add(0);
+            for(int i=0;i< surface_dt2.Columns.Count - 4;i++)
+            {
+                vs.Add(0);
+            }
             int total = 0;
             for (int i = 0; i < surface_dt2.Rows.Count; i++)
             {
-                for (int a = 1; a < 10; a++)
+                
+                for (int a = 0; a < surface_dt2.Columns.Count-4; a++)
                 {
-                    if (surface_dt2.Rows[i]["c" + a.ToString()] != " " && surface_dt2.Rows[i]["c" + a.ToString()] != "" && surface_dt2.Rows[i]["c" + a.ToString()] != null)
+                    if (surface_dt2.Rows[i][a] != " " && surface_dt2.Rows[i][a] != null)
                     {
-                        bool isNumeric = double.TryParse(surface_dt2.Rows[i]["c" + a.ToString()].ToString(), out double result);
+                        bool isNumeric = double.TryParse(surface_dt2.Rows[i][a].ToString(), out double result);
                         if (isNumeric)
-                            vs[a - 1] += Convert.ToInt32(result);
+                            vs[a] += Convert.ToInt32(result);
                     }
                 }
                 total += Convert.ToInt32(surface_dt2.Rows[i]["total"]);
@@ -476,20 +581,27 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTable3.Rows[0].Cells[0].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             xrTable3.Rows[0].Cells[1].Text = total.ToString();
             xrTable3.Rows[0].Cells[1].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[2].Text = vs[0].ToString();
-            xrTable3.Rows[0].Cells[2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[3].Text = vs[1].ToString();
-            xrTable3.Rows[0].Cells[3].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[4].Text = vs[2].ToString();
-            xrTable3.Rows[0].Cells[4].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[5].Text = vs[3].ToString();
-            xrTable3.Rows[0].Cells[5].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[6].Text = vs[4].ToString();
-            xrTable3.Rows[0].Cells[6].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[7].Text = vs[5].ToString();
-            xrTable3.Rows[0].Cells[7].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
-            xrTable3.Rows[0].Cells[8].Text = vs[6].ToString();
-            xrTable3.Rows[0].Cells[8].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            for (int i=0;i< vs.Count; i++)
+            {
+                xrTable3.Rows[0].Cells[i+2].Text = vs[i].ToString();
+                xrTable3.Rows[0].Cells[i + 2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            }
+
+            
+            //xrTable3.Rows[0].Cells[2].Text = vs[0].ToString();
+            //xrTable3.Rows[0].Cells[2].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[3].Text = vs[1].ToString();
+            //xrTable3.Rows[0].Cells[3].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[4].Text = vs[2].ToString();
+            //xrTable3.Rows[0].Cells[4].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[5].Text = vs[3].ToString();
+            //xrTable3.Rows[0].Cells[5].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[6].Text = vs[4].ToString();
+            //xrTable3.Rows[0].Cells[6].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[7].Text = vs[5].ToString();
+            //xrTable3.Rows[0].Cells[7].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            //xrTable3.Rows[0].Cells[8].Text = vs[6].ToString();
+            //xrTable3.Rows[0].Cells[8].TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
             NeueStartposition = xrTable3.LocationF.Y + xrTable3.SizeF.Height + 1;
 
             this.Detail.Controls.Add(xrTable3);
@@ -525,15 +637,6 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 }
             }
 
-            //for (int i=0;i< dataTable.Rows.Count;i++)
-            //{
-            //    if (!string.IsNullOrWhiteSpace(dataTable.Rows[i]["Name"].ToString()))
-            //    {
-            //        dataTable.Rows[i].Delete();
-            //    }
-            //}
-
-            //dataTable.AcceptChanges();
             DataTable dt = dataTable.Clone();
             for (int i=0;i< dataTable.Rows.Count;i++)
             {
@@ -894,15 +997,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                     if (subdivdeData.Rows[i]["Name"].ToString() != "")
                     {
                         DataRow dr = surface_dt2.NewRow();
-                        dr["c1"] = subdivdeData.Rows[i]["c1"];
-                        dr["c2"] = subdivdeData.Rows[i]["c2"];
-                        dr["c3"] = subdivdeData.Rows[i]["c3"];
-                        dr["c4"] = subdivdeData.Rows[i]["c4"];
-                        dr["c5"] = subdivdeData.Rows[i]["c5"];
-                        dr["c6"] = subdivdeData.Rows[i]["c6"];
-                        dr["c7"] = subdivdeData.Rows[i]["c7"];
-                        dr["c8"] = subdivdeData.Rows[i]["c8"];
-                        dr["c9"] = subdivdeData.Rows[i]["c9"];
+                        List<string> colid = basicData.GetParticlesizeTable();
+                        for (int a=0;a< colid.Count;a++)
+                        {
+                            dr["c"+(a+1).ToString()] = subdivdeData.Rows[i]["c" + (a + 1).ToString()];
+                        }
+ 
                         dr["Name"] = subdivdeData.Rows[i]["Name"];
                         dr["total"] = subdivdeData.Rows[i]["total"];
                         dr["Class"] = subdivdeData.Rows[i]["Class"];
@@ -1064,7 +1164,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             dt.Columns.Add("num");
             for (int i = 0; i < dataTable.Rows.Count; i++)
             {
-                for (int a = 0; a < 10; a++)
+                for (int a = 0; a < TypeRange.Columns.Count; a++)
                 {
                     if (string.IsNullOrEmpty(TypeRange.Rows[0][a].ToString()))
                         continue;
@@ -1222,9 +1322,6 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                     continue;
                 }
             }
-            //REORDER_data.Rows[ls].Delete();
-            //REORDER_data.AcceptChanges();
-
 
           
             List<List<ElementalAnalysisDEVData>> list_ElementalAnalysisData = new List<List<ElementalAnalysisDEVData>>();
@@ -1320,17 +1417,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 
             string name = "";
             string notes = "";
-            //for (int i=0;i< a_data.Rows.Count;i++)
-            //{
-            //    if (languageData.Rows[i]["Name"].ToString()== "tCell_Name")
-            //    {
-            //        name = languageData.Rows[i]["Text"].ToString();
-            //    }
-            //    if (languageData.Rows[i]["Name"].ToString() == "tCell_Notes")
-            //    {
-            //        notes = languageData.Rows[i]["Text"].ToString();
-            //    }
-            //}
+    
 
             name = GetlanguageData("tcell_name", "特征/夹杂物指数");
             notes = GetlanguageData("tcell_notes", "夹杂物指数=夹杂物面积/扫描面积*比例因子");
@@ -1834,7 +1921,10 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         /// <param name="size_6"></param>
         /// <param name="size_7"></param>
         /// <returns></returns>
-        private List<ParticleSizeDEVData> switch_ParticleSize(string Class, string Name, string total, string size_1, string size_2, string size_3, string size_4, string size_5, string size_6, string size_7)
+        private List<ParticleSizeDEVData> switch_ParticleSize(string Class, string Name,
+            string total, string size_1, string size_2, string size_3, string size_4, string size_5,
+            string size_6, string size_7, string size_8, string size_9, string size_10, string size_11
+            , string size_12)
         {
             List<ParticleSizeDEVData> oTS_DEVs = new List<ParticleSizeDEVData>();
             oTS_DEVs.Add(new ParticleSizeDEVData
@@ -1848,7 +1938,13 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 size_4 = size_4,
                 size_5 = size_5,
                 size_6 = size_6,
-                size_7 = size_7
+                size_7 = size_7,
+
+                size_8 = size_8,
+                size_9 = size_9,
+                size_10 = size_10,
+                size_11 = size_11,
+                size_12 = size_12
             });
             return oTS_DEVs;
         }
@@ -2008,19 +2104,31 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             XRTableCell Template_Rows3_Cell_8 = new XRTableCell();
             XRTableCell Template_Rows3_Cell_9 = new XRTableCell();
 
+            XRTableCell Template_Rows3_Cell_10 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_11 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_12 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_13 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_14 = new XRTableCell();
+
             Template_Rows1_Cell_1.WidthF = 668f;
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_1);
             Template_Rows2_Cell_1.WidthF = 668f;
             Template_Rows_2.Controls.Add(Template_Rows2_Cell_1);
             Template_Rows3_Cell_1.WidthF = 100f;
             Template_Rows3_Cell_2.WidthF = 55;
-            Template_Rows3_Cell_3.WidthF = 59;
-            Template_Rows3_Cell_4.WidthF = 59;
-            Template_Rows3_Cell_5.WidthF = 59;
-            Template_Rows3_Cell_6.WidthF = 59;
-            Template_Rows3_Cell_7.WidthF = 59;
-            Template_Rows3_Cell_8.WidthF = 59;
-            Template_Rows3_Cell_9.WidthF = 59;
+            Template_Rows3_Cell_3.WidthF = 45;
+            Template_Rows3_Cell_4.WidthF = 45;
+            Template_Rows3_Cell_5.WidthF = 45;
+            Template_Rows3_Cell_6.WidthF = 45;
+            Template_Rows3_Cell_7.WidthF = 45;
+            Template_Rows3_Cell_8.WidthF = 45;
+            Template_Rows3_Cell_9.WidthF = 45;
+
+            Template_Rows3_Cell_10.WidthF = 45;
+            Template_Rows3_Cell_11.WidthF = 45;
+            Template_Rows3_Cell_12.WidthF = 45;
+            Template_Rows3_Cell_13.WidthF = 45;
+            Template_Rows3_Cell_14.WidthF = 45;
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_1);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_2);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_3);
@@ -2030,6 +2138,14 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_7);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_8);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_9);
+
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_10);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_11);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_12);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_13);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_14);
+
+
             Template.Rows.Add(Template_Rows_1);
             Template.Rows.Add(Template_Rows_2);
             Template.Rows.Add(Template_Rows_3);
@@ -2057,15 +2173,27 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             XRTableCell Template_Rows1_Cell_7 = new XRTableCell();
             XRTableCell Template_Rows1_Cell_8 = new XRTableCell();
             XRTableCell Template_Rows1_Cell_9 = new XRTableCell();
+
+            XRTableCell Template_Rows1_Cell_10 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_11= new XRTableCell();
+            XRTableCell Template_Rows1_Cell_12 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_13 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_14 = new XRTableCell();
             Template_Rows1_Cell_1.WidthF = 100;
             Template_Rows1_Cell_2.WidthF = 55f;
-            Template_Rows1_Cell_3.WidthF = 59f;
-            Template_Rows1_Cell_4.WidthF = 59f;
-            Template_Rows1_Cell_5.WidthF = 59f;
-            Template_Rows1_Cell_6.WidthF = 59f;
-            Template_Rows1_Cell_7.WidthF = 59f;
-            Template_Rows1_Cell_8.WidthF = 59f;
-            Template_Rows1_Cell_9.WidthF = 59f;
+            Template_Rows1_Cell_3.WidthF = 45;
+            Template_Rows1_Cell_4.WidthF = 45;
+            Template_Rows1_Cell_5.WidthF = 45;
+            Template_Rows1_Cell_6.WidthF = 45;
+            Template_Rows1_Cell_7.WidthF = 45;
+            Template_Rows1_Cell_8.WidthF = 45;
+            Template_Rows1_Cell_9.WidthF = 45;
+
+            Template_Rows1_Cell_10.WidthF = 45;
+            Template_Rows1_Cell_11.WidthF = 45;
+            Template_Rows1_Cell_12.WidthF = 45;
+            Template_Rows1_Cell_13.WidthF = 45;
+            Template_Rows1_Cell_14.WidthF = 45;
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_1);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_2);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_3);
@@ -2075,6 +2203,13 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_7);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_8);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_9);
+
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_10);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_11);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_12);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_13);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_14);
+
             Template.Rows.Add(Template_Rows_1);
             Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
             Template.SizeF = new SizeF(668f, Template.SizeF.Height);
@@ -2106,6 +2241,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             XRTableCell Template_Rows3_Cell_9 = new XRTableCell();
             XRTableCell Template_Rows3_Cell_10 = new XRTableCell();
 
+            XRTableCell Template_Rows3_Cell_11 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_12 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_13 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_14 = new XRTableCell();
+            XRTableCell Template_Rows3_Cell_15 = new XRTableCell();
+
             Template_Rows1_Cell_1.WidthF = 668f;
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_1);
             Template_Rows2_Cell_1.WidthF = 668f;
@@ -2113,13 +2254,20 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             Template_Rows3_Cell_1.WidthF = 100f;
             Template_Rows3_Cell_2.WidthF = 100f;
             Template_Rows3_Cell_3.WidthF = 55;
-            Template_Rows3_Cell_4.WidthF = 59;
-            Template_Rows3_Cell_5.WidthF = 59;
-            Template_Rows3_Cell_6.WidthF = 59;
-            Template_Rows3_Cell_7.WidthF = 59;
-            Template_Rows3_Cell_8.WidthF = 59;
-            Template_Rows3_Cell_9.WidthF = 59;
-            Template_Rows3_Cell_10.WidthF = 59;
+            Template_Rows3_Cell_4.WidthF = 45;
+            Template_Rows3_Cell_5.WidthF = 45;
+            Template_Rows3_Cell_6.WidthF = 45;
+            Template_Rows3_Cell_7.WidthF = 45;
+            Template_Rows3_Cell_8.WidthF = 45;
+            Template_Rows3_Cell_9.WidthF = 45;
+            Template_Rows3_Cell_10.WidthF = 45;
+
+            Template_Rows3_Cell_11.WidthF = 45;
+            Template_Rows3_Cell_12.WidthF = 45;
+            Template_Rows3_Cell_13.WidthF = 45;
+            Template_Rows3_Cell_14.WidthF = 45;
+            Template_Rows3_Cell_15.WidthF = 45;
+
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_1);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_2);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_3);
@@ -2130,6 +2278,13 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_8);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_9);
             Template_Rows_3.Controls.Add(Template_Rows3_Cell_10);
+
+
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_11);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_12);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_13);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_14);
+            Template_Rows_3.Controls.Add(Template_Rows3_Cell_15);
             Template.Rows.Add(Template_Rows_1);
             Template.Rows.Add(Template_Rows_2);
             Template.Rows.Add(Template_Rows_3);
@@ -2157,15 +2312,27 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             XRTableCell Template_Rows1_Cell_7 = new XRTableCell();
             XRTableCell Template_Rows1_Cell_8 = new XRTableCell();
             XRTableCell Template_Rows1_Cell_9 = new XRTableCell();
+
+            XRTableCell Template_Rows1_Cell_10 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_11 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_12 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_13 = new XRTableCell();
+            XRTableCell Template_Rows1_Cell_14 = new XRTableCell();
             Template_Rows1_Cell_1.WidthF = 200f;
             Template_Rows1_Cell_2.WidthF = 55f;
-            Template_Rows1_Cell_3.WidthF = 59f;
-            Template_Rows1_Cell_4.WidthF = 59f;
-            Template_Rows1_Cell_5.WidthF = 59f;
-            Template_Rows1_Cell_6.WidthF = 59f;
-            Template_Rows1_Cell_7.WidthF = 59f;
-            Template_Rows1_Cell_8.WidthF = 59f;
-            Template_Rows1_Cell_9.WidthF = 59f;
+            Template_Rows1_Cell_3.WidthF = 45;
+            Template_Rows1_Cell_4.WidthF = 45;
+            Template_Rows1_Cell_5.WidthF = 45;
+            Template_Rows1_Cell_6.WidthF = 45;
+            Template_Rows1_Cell_7.WidthF = 45;
+            Template_Rows1_Cell_8.WidthF = 45;
+            Template_Rows1_Cell_9.WidthF = 45;
+
+            Template_Rows1_Cell_10.WidthF = 45;
+            Template_Rows1_Cell_11.WidthF = 45;
+            Template_Rows1_Cell_12.WidthF = 45;
+            Template_Rows1_Cell_13.WidthF = 45;
+            Template_Rows1_Cell_14.WidthF = 45;
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_1);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_2);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_3);
@@ -2175,6 +2342,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_7);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_8);
             Template_Rows_1.Controls.Add(Template_Rows1_Cell_9);
+
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_10);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_11);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_12);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_13);
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_14);
             Template.Rows.Add(Template_Rows_1);
             Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
             Template.SizeF = new SizeF(668f, Template.SizeF.Height);
@@ -2779,6 +2952,12 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         public string size_5 { get; set; }
         public string size_6 { get; set; }
         public string size_7 { get; set; }
+
+        public string size_8 { get; set; }
+        public string size_9 { get; set; }
+        public string size_10 { get; set; }
+        public string size_11 { get; set; }
+        public string size_12 { get; set; }
     }
     public class ElementalAnalysisDEVData
     {

+ 1 - 1
OTSIncAReportApp/2-CommonFunction/OTSRstMgrFunction/ResultFile.cs

@@ -221,7 +221,7 @@ namespace OTSIncAReportApp.OTSRstMgrFunction
                 Dictionary<string, object> valuePairs=(Dictionary<string, object>)ResultInfo["Sample"];
                 if (valuePairs.ContainsKey("TotalArea"))
                 {
-                    dTotalArea = Convert.ToDouble(valuePairs["TotalArea"]) *1000000 ;
+                    dTotalArea = Convert.ToDouble(valuePairs["TotalArea"]) /**1000000*/ ;
                     return dTotalArea;
                 }
                 else