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
165
Print UltraGrid as part of a report that contains other data
posted

I am working on an application that needs to print some reports that could contain some information that is displayed using the UltraGrid. A page that has a grid could contain other elemens (graphs) that show data that is usually related to the data in the grid and the paging of the report can be determined by either the content of the graph or the content of the grid (whichever has less infromation). The reports can also contain other sections that don't have a grid or have grids that contain other data.

Given these conditions, I don't think I can print the reports using the UltaGridPrintDocument and the normal printing mechanism for UltraGrid (that I used in other areas of the software). I can take care of the paging by setting the appropriate data source content for the grid. The problem is drawing the grid in the Graphics for the print or print preview. Drawing the control into a bitmap (DrawToBitmap) and then using the bitmap would print the grid, but the results are not as good as the built-in print (not to mention the fact that the printing would be slow because of the printing of a large image). I also tried to use the UI elements taht make up the grid and then call Print on those elements, but it seems there is a difference between the resolution: the elements are printed very small, even if the DPI in the Graphics is something like 600 for example).

Does anyone have other ideas or suggestions? How can someone print the grid without using UltraGridPrintDocument?