User (Old forums)MemberJuly 8, 2005 at 4:45 pmPost count: 23064
Currently we use Xceed grid as a visual report. We are now wanting to print this information to the printer. Unfortunately there are 2 issues.
1) We would like to add a custom header at the top of each printed page. This is so we can have the query criteria, page number and date printed on each page.
2) We would like the printing to scale to fit the page width. Currently the grid is too wide to fit on one printed page.
Is there a way to redirect the output to a bitmap – or scale the grid before printing? Is there a way to add custom headers?
Imported from legacy forums. Posted by Garry (had 7284 views)User (Old forums)MemberJuly 16, 2005 at 6:25 pmPost count: 23064
To add headers derive a class from the GridPrintDocument class. Then in the OnPrintPage method of that class you can use the e.graphics.DrawString method to create the header lines. I use an arraylist of the header lines that I pass to the derived Print class via an overloaded constructor.
You will need to scale the grid (the column widths) to the page width which you can retrieve from an instance of your class and it’s (printer) Bounds and Margins properties. For example assume printDoc is th instance variable:
pageWidth = printDoc.DefaultPageSettings.Bounds.Right – (printDoc.DefaultPageSettings.Margins.Right + printDoc.DefaultPageSettings.Margins.Left)
Create an instance of your grid with all the columns set to FittedWidth then adjust all the widths by a factor that fits the page. If the columns’ FittedWidths are too wide, be sure to set the columns to allow word wrapping. Instead of multiplying all column widths by a common factor you may want to set a limit on columns that are extremely wide.
You could also reduce the font size of your grid instance to make it fit the page to avoid the word wrapping, but if you want the printing to look like a report scaling to the page width would still be desirable.
Imported from legacy forums. Posted by Kareem (had 506 views)Odi [Xceed]SpectatorJuly 18, 2005 at 1:43 pmPost count: 426
Kareem has proposed some interesting ideas. I’d like to add also that Xceed is adding built-in features to the grid which will solve the needs you describe. Expect this in early Q4 2005.
Imported from legacy forums. Posted by Odi [Xceed] (had 720 views)User (Old forums)MemberOctober 18, 2005 at 9:05 pmPost count: 23064
Have these built-in features been released yet? Repeating headers/footers and scaling to fit page width would be very handy additions to the grid (not to mention the missing ExportToExcel, ExportToHTML, ExportToXML features).
Imported from legacy forums. Posted by billmonti (had 511 views)Odi [Xceed]SpectatorOctober 19, 2005 at 10:00 amPost count: 426
I’ll keep you posted. We’re behind schedule on this feature. It could go as far as January 2006 before it is made publicly available. Write to me at KosmatosO@xceedsoft.com if you want to get your hands on a beta version next month.
Imported from legacy forums. Posted by Odi [Xceed] (had 537 views)User (Old forums)MemberOctober 20, 2005 at 2:36 amPost count: 23064
How stable is the beta version? Is it stable enough to use in production code? Our application could really use virtual mode grid, because we’re displaying tons of data, and we’re pushing the limits of performance.
Imported from legacy forums. Posted by Tommy (had 488 views)Odi [Xceed]SpectatorOctober 20, 2005 at 9:40 amPost count: 426
Virtual mode didn’t make it in this upcoming release. However, it is planned for the release right after. I have no date to offer yet, but end of Q1 2006 would be the target release date with the information I have at this time.
Now would be a great time to email me at KosmatosO@xceedsoft.com and let us know how you would like to see Virtual Mode implemented. What would be your “dream” Virtual mode? 🙂 Of course, responding here on the forums is also welcome. We will consider both types of input during our design phase.
Stability of the beta: Not usable in production code, until the end of the beta, which will last about 5 weeks for this new version. Right now we are completing our alpha stage (this alpha is internal only for competitive reasons).
Imported from legacy forums. Posted by Odi [Xceed] (had 375 views)User (Old forums)MemberMarch 8, 2006 at 4:32 pmPost count: 23064
Did the features mentioned in this thread make it into the February 13, 2006 release? Right now, I’m specifically trying to put a header at the top of my report.
Imported from legacy forums. Posted by skemper (had 715 views)User (Old forums)MemberMarch 8, 2006 at 5:18 pmPost count: 23064
Use the method I posted earlier. It works perfectly if you need additional help with it after trying, post your questions(s).
Imported from legacy forums. Posted by Kareem (had 399 views)User (Old forums)MemberMarch 8, 2006 at 5:47 pmPost count: 23064
Sorry Kareem, my inexperience with .Net is showing. I’ve spent some time playing around with your suggestion but don’t know what questions to ask yet. Some sample code might help? Thanks!
Imported from legacy forums. Posted by skemper (had 477 views)Odi [Xceed]SpectatorMarch 9, 2006 at 11:22 amPost count: 426
The features did make it into Grid v3.0. Have you taken a look at it yet? We’re working on some improvements to the new grid reporting functionality and will soon have another release. Any comments you have are always appreciated.
Imported from legacy forums. Posted by Odi [Xceed] (had 725 views)
- You must be logged in to reply to this topic.