|
@@ -15,6 +15,7 @@ using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
using System.Windows.Forms;
|
|
|
+using static OTSDataType.otsdataconst;
|
|
|
using static OTSIncAReportApp.OTSReport_Export;
|
|
|
|
|
|
namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
@@ -368,7 +369,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
xrChart_ParticelSizeSubdivision.Visible = true;
|
|
|
List<List<ParticleSizeDEVData>> list_ParticelSizeData = new List<List<ParticleSizeDEVData>>();
|
|
|
int ls = 0;
|
|
|
- DataTable REORDER_data = REORDER(CompositeData[1], "Name");
|
|
|
+ DataTable REORDER_data = REORDER(surface_dt2, "TypeId");
|
|
|
for (int i = 0; i < REORDER_data.Rows.Count; i++)
|
|
|
{
|
|
|
if (REORDER_data.Rows[i]["Name"].ToString() == "" || REORDER_data.Rows[i]["Name"].ToString() == null)
|
|
@@ -507,14 +508,14 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
|
|
|
for (int i=0;i< data.Rows.Count;i++)
|
|
|
{
|
|
|
- if (TemplateClass.list_str_MainPriority.Count!=0)
|
|
|
+ if (TemplateClass.list_str_MainPriority_Serial.Count!=0)
|
|
|
{
|
|
|
- for (int a = 0; a < TemplateClass.list_str_MainPriority.Count; a++)
|
|
|
+ for (int a = 0; a < TemplateClass.list_str_MainPriority_Serial.Count; a++)
|
|
|
{
|
|
|
- if (data.Rows[i][field].ToString() == TemplateClass.list_str_MainPriority[a])
|
|
|
+ if (data.Rows[i][field].ToString() == TemplateClass.list_str_MainPriority_Serial[a])
|
|
|
{
|
|
|
dataTable.Rows.Add(data.Rows[i].ItemArray);
|
|
|
- break; ;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -523,18 +524,26 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
dataTable.Rows.Add(data.Rows[i].ItemArray);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ //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++)
|
|
|
{
|
|
|
- if (!string.IsNullOrWhiteSpace(dataTable.Rows[i]["Class"].ToString()))
|
|
|
+ if (dataTable.Rows[i]["Name"].ToString()!="")
|
|
|
{
|
|
|
- dataTable.Rows[i].Delete();
|
|
|
+ dt.Rows.Add(dataTable.Rows[i].ItemArray);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- dataTable.AcceptChanges();
|
|
|
-
|
|
|
- return dataTable.Copy();
|
|
|
+ return dt.Copy();
|
|
|
|
|
|
}
|
|
|
/// <summary>
|
|
@@ -683,6 +692,10 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
int pos = 3;
|
|
|
for (int i=0; i< listMin.Count; i++)
|
|
|
{
|
|
|
+ if(i>7)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
xt_TCleannessA.Rows[0].Cells[pos].Text = listMin[i].ToString() + " ~";
|
|
|
if (listMax[i] == int.MaxValue)
|
|
|
xt_TCleannessA.Rows[1].Cells[pos].Text = "MAX";
|
|
@@ -864,23 +877,53 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
/// <param name="a_pieSeries">小分类</param>
|
|
|
public void setParticleSizeTable(bool a_pieSeriesClass, bool a_pieSeries, bool isStacking)
|
|
|
{
|
|
|
-
|
|
|
+ //if (m_ReportApp.m_RptConfigFile.Systype != OTS_SysType_ID.IncA)
|
|
|
|
|
|
- xrPageBreak1.Visible = true;
|
|
|
+ xrPageBreak1.Visible = true;
|
|
|
ParticleAnalysis particleList = new ParticleAnalysis();
|
|
|
List<DataTable> CompositeData = particleList.GetClassificationConsolidationTable(basicData);
|
|
|
DataTable classData= particleList.GetLargeClassification(basicData);
|
|
|
DataTable subdivdeData = particleList.GetSubClassification(basicData);
|
|
|
DataTable chartmax= particleList.GetChartDataCalss(basicData);
|
|
|
DataTable surface_dt2 = CompositeData[1].Clone();
|
|
|
- for (int i=0;i< CompositeData[1].Rows.Count;i++)
|
|
|
+
|
|
|
+ if (m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.Systype != OTS_SysType_ID.IncA)
|
|
|
{
|
|
|
- if (CompositeData[1].Rows[i]["Name"].ToString()!="")
|
|
|
+ for(int i=0;i< subdivdeData.Rows.Count;i++)
|
|
|
+ {
|
|
|
+ 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"];
|
|
|
+ dr["Name"] = subdivdeData.Rows[i]["Name"];
|
|
|
+ dr["total"] = subdivdeData.Rows[i]["total"];
|
|
|
+ dr["Class"] = subdivdeData.Rows[i]["Class"];
|
|
|
+ dr["TypeId"] = subdivdeData.Rows[i]["TypeId"];
|
|
|
+ surface_dt2.Rows.Add(dr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for (int i = 0; i < CompositeData[1].Rows.Count; i++)
|
|
|
{
|
|
|
- surface_dt2.Rows.Add(CompositeData[1].Rows[i].ItemArray);
|
|
|
+ if (CompositeData[1].Rows[i]["Name"].ToString() != "")
|
|
|
+ {
|
|
|
+ surface_dt2.Rows.Add(CompositeData[1].Rows[i].ItemArray);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
for (int i = 0; i < classData.Rows.Count; i++)
|
|
|
{
|
|
|
classData.Rows[i]["Class"] = subscript.Getsubscriptstring(classData.Rows[i]["Class"].ToString());
|
|
@@ -1021,7 +1064,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
dt.Columns.Add("num");
|
|
|
for (int i = 0; i < dataTable.Rows.Count; i++)
|
|
|
{
|
|
|
- for (int a = 0; a < 11; a++)
|
|
|
+ for (int a = 0; a < 10; a++)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(TypeRange.Rows[0][a].ToString()))
|
|
|
continue;
|
|
@@ -1167,7 +1210,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
|
|
|
|
|
|
int ls = 0;
|
|
|
- DataTable REORDER_data = REORDER(a_datas[1], "Name");
|
|
|
+ DataTable REORDER_data = REORDER(a_datas[1], "TypeId");
|
|
|
if (REORDER_data.Rows.Count == 0)
|
|
|
return;
|
|
|
|
|
@@ -1254,11 +1297,18 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
public void setElementAvgGrid()
|
|
|
{
|
|
|
ElementalAnalysis elementalAnalysis = new ElementalAnalysis();
|
|
|
- List<DataTable> datas = elementalAnalysis.GetElementData(basicData, m_otsreport_export);
|
|
|
+
|
|
|
if (basicData.GetIsThereAMajorClassification())
|
|
|
+ {
|
|
|
+ List<DataTable> datas = elementalAnalysis.GetElementData(basicData, m_otsreport_export,false);
|
|
|
add_SetElementAvgGridS(datas);
|
|
|
+ }
|
|
|
else
|
|
|
+ {
|
|
|
+ List<DataTable> datas = elementalAnalysis.GetElementData(basicData, m_otsreport_export,true);
|
|
|
add_SetElementAvgGrid(datas);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private XRTableRow AddInclusionIndex(string a_str)
|