Hi.
I'm using VS 2015
and CR v13,SP16
i am using user defined paper 12 x 14 cm,
when print using PrintOutputController.PrintReport the result become smaller than it should be.
when print using CRViewer the result is good and as it should be. but user must set the preferences to user defined paper size and the other printer setting. even though my default setting from control panel has been set.
is there anyways to make it programatically sett all of the properties?
datasource for R is setted with another function.
this is my printing code
PrintDocument pDoc = new PrintDocument();
PrinterSettings dPrinterSett = new PrinterSettings();
PageSettings dPageSetting = new PageSettings();
PrintOptions printOption = R.ReportClientDocument.PrintOutputController.GetPrintOptions();
printOption.DissociatePageSizeAndPrinterPaperSize = false;
printOption.PaperSize = CrPaperSizeEnum.crPaperSizeUser;
printOption.PrinterDuplex = CrPrinterDuplexEnum.crPrinterDuplexSimplex;
PrintReportOptions printReportOption = new PrintReportOptions();
printReportOption.PaperSize = CrPaperSizeEnum.crPaperSizeUser;
printReportOption.Collated = true;
R.ReportClientDocument.PrintOutputController.ModifyPrintOptions(printOption);
R.ReportClientDocument.PrintOutputController.ModifyPrinterName(dPrinterSett.PrinterName);
R.ReportClientDocument.PrintOutputController.ModifyUserPaperSize((dPageSetting.PaperSize.Height * 1440/100), (dPageSetting.PaperSize.Width * 1440/100));
if (pDoc.DefaultPageSettings.PaperSize.Height > pDoc.DefaultPageSettings.PaperSize.Width)
{
R.ReportClientDocument.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationPortrait);
}
else
{
R.ReportClientDocument.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationLandscape);
}
R.ReportClientDocument.PrintOutputController.PrintReport(printReportOption);
Any Help is appreciated,
Thankyou..