|
@@ -160,7 +160,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
/// 颗粒尺寸分析表
|
|
|
/// </summary>
|
|
|
/// <param name="TemplateClass"></param>
|
|
|
- public void setParticleSizeTable()
|
|
|
+ public void setParticleSizeTable(bool a_pieSeriesClass,bool a_pieSeries)
|
|
|
{
|
|
|
//ElementSubscript subscript = new ElementSubscript();
|
|
|
// Export_ReportTemplate export_ReportTemplate = new Export_ReportTemplate(m_otsreport_export);
|
|
@@ -180,8 +180,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
xrTa_ParticleSizeTable.Visible = true;
|
|
|
xrChart_ParticelSizeCalss.Visible = true;
|
|
|
xrChart_ParticelSizeSubdivision.Visible = true;
|
|
|
- xrLabel_size_IconQuestion_Class.Visible = true;
|
|
|
- xrLabel_size_IconQuestion_Subdivision.Visible = true;
|
|
|
+ //xrLabel_size_IconQuestion_Class.Visible = true;
|
|
|
+ //xrLabel_size_IconQuestion_Subdivision.Visible = true;
|
|
|
List<List<ParticleSizeDEVData>> list_ParticelSizeData = new List<List<ParticleSizeDEVData>>();
|
|
|
|
|
|
|
|
@@ -246,63 +246,77 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
}
|
|
|
|
|
|
#region 大分类chart图
|
|
|
-
|
|
|
- DataView dv = class_dt.DefaultView;
|
|
|
- dv.Sort = "total DESC";
|
|
|
- DataTable dt_class_dt = dv.ToTable();
|
|
|
-
|
|
|
- // 实例化饼图对象
|
|
|
- Series pieSeriesClass = new Series("颗粒尺寸大分类", ViewType.Pie);
|
|
|
- pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeriesClass.ArgumentDataMember = "Class";
|
|
|
- pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeriesClass.ValueDataMembers.AddRange(new string[] { "total" });
|
|
|
- (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
- //显示百分比
|
|
|
- pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
- pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
- //设置数据源
|
|
|
- pieSeriesClass.DataSource = dt_class_dt;
|
|
|
- pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
- xrChart_ParticelSizeCalss.Series.Add(pieSeriesClass);
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.TextOffset = 5;
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_ParticelSizeCalss.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ if (a_pieSeriesClass)
|
|
|
+ {
|
|
|
+ xrLabel_size_IconQuestion_Class.Visible = true;
|
|
|
+ DataView dv = class_dt.DefaultView;
|
|
|
+ dv.Sort = "total DESC";
|
|
|
+ DataTable dt_class_dt = dv.ToTable();
|
|
|
+
|
|
|
+ // 实例化饼图对象
|
|
|
+ Series pieSeriesClass = new Series("颗粒尺寸大分类", ViewType.Pie);
|
|
|
+ pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
+ // 项目名称
|
|
|
+ pieSeriesClass.ArgumentDataMember = "Class";
|
|
|
+ pieSeriesClass.ValueScaleType = ScaleType.Numerical;
|
|
|
+ //取值字段
|
|
|
+ pieSeriesClass.ValueDataMembers.AddRange(new string[] { "total" });
|
|
|
+ (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
+ //显示百分比
|
|
|
+ pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
+ pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
+ //设置数据源
|
|
|
+ pieSeriesClass.DataSource = dt_class_dt;
|
|
|
+ pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
+ // 饼图空间添加 新建的饼图对象
|
|
|
+ xrChart_ParticelSizeCalss.Series.Add(pieSeriesClass);
|
|
|
+ //右上角分组视图
|
|
|
+ this.xrChart_ParticelSizeCalss.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
+ this.xrChart_ParticelSizeCalss.Legend.TextOffset = 5;
|
|
|
+ this.xrChart_ParticelSizeCalss.Legend.VerticalIndent = 5;
|
|
|
+ this.xrChart_ParticelSizeCalss.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
#region 细分chart图
|
|
|
+ if(a_pieSeries)
|
|
|
+ {
|
|
|
+ if (!a_pieSeriesClass)
|
|
|
+ {
|
|
|
+ xrLabel_size_IconQuestion_Subdivision.LocationF = xrLabel_size_IconQuestion_Class.LocationF;
|
|
|
+
|
|
|
+ xrChart_ParticelSizeSubdivision.LocationF = xrChart_ParticelSizeCalss.LocationF;
|
|
|
+ }
|
|
|
|
|
|
- DataView dv2 = subdivde_dt.DefaultView;
|
|
|
- dv2.Sort = "total DESC";
|
|
|
- DataTable dt_subdivde_dt = dv2.ToTable();
|
|
|
-
|
|
|
-
|
|
|
- // 实例化饼图对象
|
|
|
- Series pieSeries = new Series("颗粒尺寸细化分类", ViewType.Pie);
|
|
|
- pieSeries.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
- // 项目名称
|
|
|
- pieSeries.ArgumentDataMember = "Name";
|
|
|
- pieSeries.ValueScaleType = ScaleType.Numerical;
|
|
|
- //取值字段
|
|
|
- pieSeries.ValueDataMembers.AddRange(new string[] { "total" });
|
|
|
- (pieSeries.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
- //显示百分比
|
|
|
- pieSeries.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
- pieSeries.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
- //设置数据源
|
|
|
- pieSeries.DataSource = dt_subdivde_dt;
|
|
|
- pieSeries.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
- // 饼图空间添加 新建的饼图对象
|
|
|
- xrChart_ParticelSizeSubdivision.Series.Add(pieSeries);
|
|
|
- //右上角分组视图
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.TextOffset = 5;
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.VerticalIndent = 5;
|
|
|
- this.xrChart_ParticelSizeSubdivision.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ xrLabel_size_IconQuestion_Subdivision.Visible = true;
|
|
|
+ DataView dv2 = subdivde_dt.DefaultView;
|
|
|
+ dv2.Sort = "total DESC";
|
|
|
+ DataTable dt_subdivde_dt = dv2.ToTable();
|
|
|
+
|
|
|
+ // 实例化饼图对象
|
|
|
+ Series pieSeries = new Series("颗粒尺寸细化分类", ViewType.Pie);
|
|
|
+ pieSeries.ArgumentScaleType = ScaleType.Qualitative;
|
|
|
+ // 项目名称
|
|
|
+ pieSeries.ArgumentDataMember = "Name";
|
|
|
+ pieSeries.ValueScaleType = ScaleType.Numerical;
|
|
|
+ //取值字段
|
|
|
+ pieSeries.ValueDataMembers.AddRange(new string[] { "total" });
|
|
|
+ (pieSeries.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
|
|
|
+ //显示百分比
|
|
|
+ pieSeries.PointOptions.PointView = PointView.ArgumentAndValues;
|
|
|
+ pieSeries.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
|
|
|
+ //设置数据源
|
|
|
+ pieSeries.DataSource = dt_subdivde_dt;
|
|
|
+ pieSeries.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
|
|
|
+ // 饼图空间添加 新建的饼图对象
|
|
|
+ xrChart_ParticelSizeSubdivision.Series.Add(pieSeries);
|
|
|
+ //右上角分组视图
|
|
|
+ this.xrChart_ParticelSizeSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
|
|
|
+ this.xrChart_ParticelSizeSubdivision.Legend.TextOffset = 5;
|
|
|
+ this.xrChart_ParticelSizeSubdivision.Legend.VerticalIndent = 5;
|
|
|
+ this.xrChart_ParticelSizeSubdivision.Legend.Border.Color = Color.Red;//红色边框
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
#endregion
|
|
|
}
|
|
@@ -1330,7 +1344,23 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
|
|
|
Template.Font= new Font(Schriftart_english, 12f);
|
|
|
return Template;
|
|
|
}
|
|
|
+
|
|
|
#endregion
|
|
|
+
|
|
|
+ private void xrLabel_pageinfo_PrintOnPage(object sender, PrintOnPageEventArgs e)
|
|
|
+ {
|
|
|
+ int pagecount = e.PageCount;
|
|
|
+ int pageindex = e.PageIndex;
|
|
|
+ if (pageindex < 1)
|
|
|
+ {
|
|
|
+ this.xrLabel_pageinfo.Visible = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.xrLabel_pageinfo.Visible = true;
|
|
|
+ this.xrLabel_pageinfo.Text = string.Format("第{0}页,共{1}页", pageindex , pagecount - 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public class ParticleSizeDEVData
|