Example #1
0
 private void schedulePivotGrid_PrintCell(object sender, DevExpress.XtraReports.UI.PivotGrid.CustomExportCellEventArgs e)
 {
     if (e.RowIndex % 2 == 0)
     {
         e.Appearance.BackColor = Color.White;
     }
     else
     {
         e.Appearance.BackColor = Color.LightGray;
     }
 }
Example #2
0
 private void xrPivotGrid1_PrintCell(object sender, DevExpress.XtraReports.UI.PivotGrid.CustomExportCellEventArgs e)
 {
     if (e.Value != null && (int)e.Value > 0)
     {
         DevExpress.XtraPrinting.TextBrick  tb = e.Brick as DevExpress.XtraPrinting.TextBrick;
         DevExpress.XtraPrinting.ImageBrick ib = tb.PrintingSystem.CreateBrick("ImageBrick") as DevExpress.XtraPrinting.ImageBrick;
         ib.Rect      = DevExpress.XtraPrinting.GraphicsUnitConverter.DocToPixel(e.Brick.Rect);
         tb.IsVisible = false;
         Image im = GetImageByValue((int)e.Value, ib.Rect);
         ib.Image    = im;
         ib.SizeMode = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
         tb.PrintingSystem.Graph.DrawBrick(ib);
     }
 }