コード例 #1
0
 private void xrTableCell60_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
 {
     try
     {
         if (double.TryParse(Convert.ToString(xrTableCell36.Summary.GetResult()), out value))
         {
             xrTableCell60.Text = value.ToString("n2");
         }
         if (DetailReport2.GetCurrentColumnValue("Total") != DBNull.Value)
         {
             value = Convert.ToDouble(xrTableCell36.Summary.GetResult()) + Convert.ToDouble(DetailReport2.GetCurrentColumnValue("Total"));
             xrTableCell60.Text = (value - _Discount).ToString("n2");
         }
     }
     catch (Exception ex) {}
 }
コード例 #2
0
ファイル: Report.cs プロジェクト: wmurrayPSC/Blazor
        private void Chart6_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            Color color = xrChart3.PaletteRepository["Palette 1"][DetailReport2.CurrentRowIndex].Color;

            xrChart6.PaletteRepository["Palette 1"][0].Color = color;

            xrChart6.Series[0].Points.BeginUpdate();
            xrChart6.Series[0].Points.Clear();
            var categorySales = DetailReport2.GetCurrentColumnValue <long>("Sales");
            var totalSales    = DetailReport2.GetCurrentColumnValue <decimal>("TotalSales");
            var otherSales    = totalSales - categorySales;

            xrChart6.Series[0].Points.Add(new SeriesPoint("Category Sales", categorySales));
            xrChart6.Series[0].Points.Add(new SeriesPoint("Other Sales", otherSales));
            xrChart6.Series[0].Points.EndUpdate();

            var percentageOfSales = categorySales / totalSales;

            ((DoughnutSeriesView)xrChart6.Series[0].View).TotalLabel.TextPattern = string.Format("{0:0%}", percentageOfSales);
            ((DoughnutSeriesView)xrChart6.Series[0].View).TotalLabel.TextColor   = color;
        }