/// <summary> /// Adds a new ReportDataSheetMainGrid to the page, and returns the instance /// </summary> /// <param name="page">The page to which the grid will be added</param> /// <returns>A reference to the main grid</returns> internal ReportDataSheetMainGrid AddReportDataSheetGrid(FixedPage page) { ReportDataSheetMainGrid mainGrid = new ReportDataSheetMainGrid() { Height = page.Height, Width = page.Width }; page.Children.Add(mainGrid); return(mainGrid); }
/// <summary> /// Renders a datasheet to collect test data for a report, and shows it in a preview window for printing /// </summary> /// <param name="entry">The Report entry</param> public void PrintReportDataSheet(Report entry) { FixedDocument dataSheet = new FixedDocument(); dataSheet.DocumentPaginator.PageSize = PageSizes.A4; FixedPage currentPage = _docRenderer.AddPageToFixedDocument(dataSheet); ReportDataSheetMainGrid mainGrid = _docRenderer.AddReportDataSheetGrid(currentPage); mainGrid.ReportInstance = entry; ShowPreview(dataSheet); }