public MainForm() { InitializeComponent(); XtraReport rep = new XtraReportMain(); rep.CreateDocument(); documentViewer1.DocumentSource = rep; }
public float GetTopIndent() { float sumHeight = 0; XtraReportMain mainReport = documentViewer1.DocumentSource as XtraReportMain; NestedBrickIterator iterator = new NestedBrickIterator(mainReport.Pages[mainReport.Pages.Count - 1].InnerBricks); while (iterator.MoveNext()) { if (iterator.CurrentBrick is VisualBrick) { VisualBrick brick = (VisualBrick)iterator.CurrentBrick; float bottomPos = brick.Rect.Bottom; if (bottomPos > sumHeight) { sumHeight = bottomPos; } } } sumHeight = GraphicsUnitConverter.Convert(sumHeight, GraphicsUnit.Document, GraphicsUnit.Inch) * 100; return(sumHeight); }