IIS Express or VS development Server can work, But IIS can't worked.
Program code:
var rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
var printDoc = new PrintDocument();
rd.Load(AppDomain.CurrentDomain.BaseDirectory + "rpt_shiporder.rpt");
rd.SetDataSource(dataset);
ISCDReportClientDocument rptClientDoc = rd.ReportClientDocument; PrintOutputController poc = rptClientDoc.PrintOutputController;
var pro = new PrintReportOptions
{
PrinterName = ConfigurationManager.AppSettings["ShipOrder_ReportPrinter"].Trim(),
PaperSize = CrPaperSizeEnum.crPaperSizePaperLetter,
JobTitle = "rpt_shiporder"
};
var po = new CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions
{
DissociatePageSizeAndPrinterPaperSize = true,
PaperOrientation = CrPaperOrientationEnum.crPaperOrientationPortrait
};
poc.ModifyPrintOptions(po);
poc.PrintReport(pro);
rd.Close();
rd.Dispose();
when execute this code: poc.PrintReport(pro); it does't not work and timeout.
System environment: win8.1 64bit VS2013 .net framework 4.0 IIS8.5 CRforVS_13_0_19 CRRuntime_64bit_13_0_19