User (Old forums)MemberMay 18, 2007 at 9:22 amPost count: 23064
I’m looking at printing columns on a grid vertically.
The number of columns and the size of text in each of those columns, coupled with the fact that all cells in the grid structure below will contain small integer values (hence all cells will have little width) make vertical columns on print a best solution.
I’ve implemented vertical columns on the grid itself, with reference to an existing solution elsewhere in the forum which works really well.
Does anyone know of a place i may be able to hook into to achieve this? Right now I’m investigating where this might be done.
Imported from legacy forums. Posted by matt (had 3262 views)User (Old forums)MemberMay 21, 2007 at 2:16 pmPost count: 23064
Do you use the Reporting feature of the grid, or are you simply using the Print method of the GridControl?
Imported from legacy forums. Posted by André (had 211 views)User (Old forums)MemberMay 22, 2007 at 7:11 amPost count: 23064
Have been using the Reporting object to print so far and it’s done the job fine (excluding the vertical columns).
Your reply prompted me to try a different way of printing. So using the .Print() method directly off of the grid, or using a GridPrintDocument object (again with .Print()) actually causes an exception in both areas where I use a grid to print.
The last part of the stack trace can be seen below, is there anything obvious in the way I am using the grid that might cause this to occur? Using the Reporting class to print has never caused me a problem.
System.ArgumentException was unhandled
Message=”Parameter is not valid.”
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, Graphics g)
at Xceed.UI.Adaptive.VisualStyleRenderedTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Image backgroundImage, ContentAlignment backgroundImageAlignment, ImageStyle backgroundImageStyle, Double opacity)
at Xceed.UI.Adaptive.VisualStyleRenderedTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Double opacity)
at Xceed.UI.Adaptive.AdaptiveTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Double opacity)
at Xceed.Grid.RowSelectorPane.PaintBackground(GridPaintEventArgs e)
at Xceed.Grid.PrintManager.PrintRowSelectorPane(Graphics graphics)
at Xceed.Grid.GridPrintDocument.PrintPageRectangle(Graphics graphics, Rectangle pageRectangle, Rectangle bodyRectangle, Row firstPrintingRow)
at Xceed.Grid.GridPrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
Imported from legacy forums. Posted by matt (had 315 views)User (Old forums)MemberMay 23, 2007 at 3:43 pmPost count: 23064
Can you send a sample application to <a href=”mailto:email@example.com”>support</a> reproducing the exception?
Imported from legacy forums. Posted by André (had 341 views)User (Old forums)MemberMay 29, 2007 at 12:46 pmPost count: 23064
Figured out what was causing the problem – changing some properties of RowSelectorPane (Visible, Width) seems to do the trick.
I’ve got printing with vertical headers + custom graphics (header, etc) now. Lost the ability to use report templates but this is a much better way of doing things.
Imported from legacy forums. Posted by matt (had 4707 views)
- You must be logged in to reply to this topic.