Hi ,
I have problem of Custom paper size 8.5*6.00 in my crystal report. I have developed in VS 2008 and it working fine in my local but after i deploy in II7 server 2008 its taking default letter size, my code for custom size is as below,
System.Drawing.Printing.PrintDocument doctoprint = new System.Drawing.Printing.PrintDocument();
int rawKind = 0;
for (i = 0; i <= doctoprint.PrinterSettings.PaperSizes.Count - 1; i++)
{
if (doctoprint.PrinterSettings.PaperSizes[i].PaperName == "DC")
{
rawKind =
Convert.ToInt32(doctoprint.PrinterSettings.PaperSizes[i].GetType().GetField("kind", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(doctoprint.PrinterSettings.PaperSizes[i]));
// break;
// }
//}
rawKind = GetPaperSizeID();
rpt.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind;
CrystalReportViewer1.ReportSource = rpt;