Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1690
Report printing issue
posted

Hi,

I want to print a form with xamGrid on it (not xamDataGrid because it does not support cell merging). Since xamGrid does not support report paging, I do paging manually - scroll grid to specified row and print it using Report.Print(), where  grid is used as visual report section :

(Report.Sections.Add(new EmbeddedVisualReportSection(xamGrid))

and do it page by page. I do scrolling using 

xamGrid.ScrollCellIntoView(xamGrid.Rows[firstPageRow].Cells[0])

The last row of the printed grid is usually lost, only narrow top part of it is visible, something like this:

Report screenshot

I can fix it by scrolling grid on page size - 1 between the pages.In this case sometimes I have duplicate records on two pages but not a missing row. The problem is in the last row of the last page, it always truncated at the bottom. Is it possible to fix it ? 

Thanks,

Ed

Parents
  • 34510
    Offline posted

    Hi Ed,

    I tried putting together a sample but I'm stuck on trying to figure out exactly how you are printing the XamGrid per page.  At first I thought you were just doing something like this: 

    report.Sections.Add(new EmbeddedVisualReportSection(xamGrid));
    xamGrid.ScrollCellIntoView(xamGrid.Rows[firstPageRow].Cells[0]);
    report.Sections.Add(new EmbeddedVisualReportSection(xamGrid));
    xamGrid.ScrollCellIntoView(xamGrid.Rows[secondPageRow].Cells[0]);
    report.Sections.Add(new EmbeddedVisualReportSection(xamGrid));
    xamGrid.ScrollCellIntoView(xamGrid.Rows[thirdPageRow].Cells[0]);
    report.Sections.Add(new EmbeddedVisualReportSection(xamGrid));

     

    Where basically you add to the report, then call ScrollCellIntoView, then add the grid again, etc etc.  But when I do this, my first page looks correct but all the pages after it have scrolled all the way to the bottom rather than gradually scrolling down.  It seems like it's using the last XamGrid state for all pages but the first one.

    So my question to you is, how exactly are you printing this grid?  Can you post your print code for me?

Reply Children