We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Print function drop last column

Thread ID:

Created:

Updated:

Platform:

Replies:

23310 Jan 9,2005 07:53 PM Jan 10,2005 03:12 AM Windows Forms 3
loading
Tags: GridControl
David Bosak
Asked On January 9, 2005 07:53 PM

Our customer is encountering a serious problem when printing a GridDataboundGrid. Sometimes the print function doesn''t print the last column of the grid. I cannot duplicate this defect on our printer but the customer has usually been facing it. Below is the code to print a document with a title at the top of the paper and the grid under. public static void PrintGrid(GridDataBoundGrid dtgbGrid, Font titFont,string strtitle) { try { //DataGridPrintDocument dgrPrintDoc = new DataGridPrintDocument ( titleFont, title); //dgrPrintDoc.Print(); titleFont=titFont; title=strtitle; PrintDataBoundGrid(dtgbGrid); if(log.LogDebug()) log.Info("Print Grid"); } catch(Exception ex) { MessageBox.Show(ex.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); if(log.LogDebug()) log.Error(ex.Message); } } public static void PrintDataBoundGrid(GridDataBoundGrid dtgbGrid/*, Font titleFont,string title*/) { // // Add method to print the Title // //PrintGrid( try { GridPrintDocument pd = new GridPrintDocument(dtgbGrid); //Assumes the default printer pd.DefaultPageSettings.Margins.Top+=50; pd.DefaultPageSettings.Margins.Left-=25; pd.DefaultPageSettings.Margins.Right-=25; pd.PrintPage+=new PrintPageEventHandler(pd_PrintPage); pd.PrintController=new StandardPrintController(); dtgbGrid.Properties.PrintHorzLines = false; dtgbGrid.Properties.PrintVertLines = false; dtgbGrid.Properties.PrintFrame=false; dtgbGrid.Properties.CenterHorizontal=false; pd.Print(); if(log.LogDebug()) log.Info("Print Data bound grid"); } catch(Exception ex) { MessageBox.Show(ex.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); if(log.LogDebug()) log.Error(ex.Message); } } private static void pd_PrintPage(object sender, PrintPageEventArgs e) { if(title!="") { Pen p=new Pen(Color.Black); e.Graphics.DrawString(title,titleFont,p.Brush,e.MarginBounds.Left,e.MarginBounds.Top-50); e.PageSettings.Margins.Top+=50; title=""; } }

Administrator [Syncfusion]
Replied On January 10, 2005 02:20 AM

Are you using 3.0.1.0? This has a fix for in it for handles one problem like you are describing.

David Bosak
Replied On January 10, 2005 03:03 AM

I''m using 2.1.0.9. Is the defect totally fixed in 3.0.1.0? Sorry for not understanding your statement "This has a fix for in it for handles one problem like you are describing". We are getting 3.0.1.0 and try to integrate to our current code. Thanks a lot. >Are you using 3.0.1.0? This has a fix for in it for handles one problem like you are describing.

Administrator [Syncfusion]
Replied On January 10, 2005 03:12 AM

>>Is the defect totally fixed in 3.0.1.0? I don''t know what the exact defect is that you are seeing. If you can upload a sample project showing the defect (or send it to support@syncfusion.com), then I can test it with 3010 and tell you if it is fixed or not. But without testing the exact defect you are seeing, I cannot explicitly tell you that it is fixed.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;