Skip to Content
0

Print Crystal Report in WCF on IIS, Does't Not Worked, Why?

Mar 10, 2017 at 05:52 PM

71

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers