Me.UltraGridPrintDocument1.Grid = Me.UltraGrid1
How, or is there a way to assign or add multiple grids to the print document and what might that way be? Can they be combined and yet achieve the same visual form appearance? Not sure that creating my own control and inheriting from the UltraGridPrintDocument will help.
- Ken
Ken, you can try using the UltraDocumentExporter and export all your grids to the same Report using the Documents.Report class. The UltraDocument exporter lets you export many grids to one section or to different sections for each grid in the Report as long as they are the same in width so that the page size does not change.
You can "fake it" by taking the separate datatables and adding them to a dataset, then adding the dataset to the grid's datasource. I've done this in a few areas of our product so that the printout is essentially a report that is organizaed in a way our users expect. You have to get pretty fancy with the grid formatting (and in some cases dummying up false relationships between tables), but it can be done. This of course, assumes a lot about the data to be displayed.
It's not possible to use the built in printing support and print multiple grids on a single page or even as part of the same print job. If you know that all of the contents of the grid are in view and that you can fit multiple grids then you can try drawing the control to a bitmap and draw those bitmaps on the page of your own PrintDocument instance in its PrintPage event. If you want to print the form (which would not scroll the grid if there were more rows than can fit in view) then you could also look at MS' power packs which has a printform component: http://msdn2.microsoft.com/en-us/vbasic/bb735936.aspx.
Does anyone have any suggestions on how to accomplish this; a work-around that is?
Thanks,
Ken Bobel
An UltraGridPrintDocument can only be associated with a single UltraGrid and therefore each grid must be part of a separate print job.You may want to submit a suggestion for adding this - http://devcenter.infragistics.com/Protected/RequestFeature.aspx.