Example #1
0
        void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            var     schedule = (Schedule_Report)GetCurrentRow();
            XRTable table    = new XRTable()
            {
                SizeF = new System.Drawing.SizeF(xrPanel2.WidthF, 25F)
            };

            table.BeginInit();
            XRTableRow row = new XRTableRow();

            row.KeepTogether = false;

            foreach (var shift in schedule.ShiftPlans)
            {
                XRTableCell cell = new XRTableCell {
                    WidthF = xrPanel2.WidthF / schedule.ShiftPlans.Count
                };
                row.Cells.Add(cell);

                CreateShiftPlanTables(cell, shift, ShiftPlan_Report.GetTrackedResources(shift).ToList());
            }
            table.Rows.Add(row);
            table.EndInit();

            xrPanel2.KeepTogether = false;
            xrPanel2.Controls.Clear();
            xrPanel2.Controls.Add(table);
        }