public void PrintGrid(object param)
        {
            PrintDialog printDialog = new PrintDialog();

            if (printDialog.ShowDialog() == false)
                return;

            string documentTitle = "Report By Originating Attorney";
            Size pageSize = new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight);

            CommonReportPrinter paginator = new CommonReportPrinter(param as DataGrid, documentTitle, pageSize, new Thickness(30, 20, 30, 20));
            printDialog.PrintDocument(paginator, "Grid");
            Helper.ShowInformationMessageBox("Report By Originating Attorney Exported", "By Originating Attorney Report");
        }
Beispiel #2
0
        public void PrintGrid(object param)
        {
            PrintDialog printDialog = new PrintDialog();

            if (printDialog.ShowDialog() == false)
            {
                return;
            }

            string documentTitle = "Report By Originating Attorney";
            Size   pageSize      = new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight);

            CommonReportPrinter paginator = new CommonReportPrinter(param as DataGrid, documentTitle, pageSize, new Thickness(30, 20, 30, 20));

            printDialog.PrintDocument(paginator, "Grid");
            Helper.ShowInformationMessageBox("Report By Originating Attorney Exported", "By Originating Attorney Report");
        }
        public void PrintGrid(object param)
        {
            try
            {
                PrintDialog printDialog = new PrintDialog();

                if (printDialog.ShowDialog() == false)
                    return;

                string documentTitle = "All Clients";
                Size pageSize = new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight);

                CommonReportPrinter paginator = new CommonReportPrinter(param as DataGrid, documentTitle, pageSize, new Thickness(30, 20, 30, 20));
                printDialog.PrintDocument(paginator, "Grid");

                Helper.ShowInformationMessageBox("All Clients report generated successfully!", "All Clients Report");
            }
            catch (Exception ex)
            {
                Helper.LogException(ex);
            }
        }
        public void PrintGrid(object param)
        {
            try
            {
                PrintDialog printDialog = new PrintDialog();

                if (printDialog.ShowDialog() == false)
                {
                    return;
                }

                string documentTitle = "All Clients";
                Size   pageSize      = new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight);

                CommonReportPrinter paginator = new CommonReportPrinter(param as DataGrid, documentTitle, pageSize, new Thickness(30, 20, 30, 20));
                printDialog.PrintDocument(paginator, "Grid");

                Helper.ShowInformationMessageBox("All Clients report generated successfully!", "All Clients Report");
            }
            catch (Exception ex)
            {
                Helper.LogException(ex);
            }
        }