public void printCommand(object obj)
        {
            PAFMPReportView PAFMReportView = new PAFMPReportView();

            PrintDialog pd = new PrintDialog();

            if (pd.ShowDialog() != true)
            {
                return;
            }

            PAFMReportView.PAFMFlowDocument.PageHeight  = pd.PrintableAreaHeight;
            PAFMReportView.PAFMFlowDocument.PageWidth   = pd.PrintableAreaWidth;
            PAFMReportView.PAFMFlowDocument.ColumnWidth = pd.PrintableAreaWidth;
            PAFMReportView.PAFMFlowDocument.ColumnGap   = 0;

            IDocumentPaginatorSource idocument = PAFMReportView.PAFMFlowDocument as IDocumentPaginatorSource;

            pd.PrintDocument(idocument.DocumentPaginator, "Printing Flow Document...");
        }
Exemplo n.º 2
0
 private void EmployeeReport_Click(object sender, RoutedEventArgs e)
 {
     DataContext = new PAFMPReportView();
 }