Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

CR Runtime 32bits on Terminal Server 2008 R2

$
0
0

Hi,

We have the same program ( .Net x86 ) running on TSE and Win 7x64 environment, All are shared on PrintServer 2008R2.

We got this error only on TSE and not all time, the CR runtime is 32bit 13.0.15

Any ideas about the reason of error ?

Regards,

 

 

Type d'exception : System.ComponentModel.Win32Exception

Method : Void OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs)

Message : Descripteur non valide

Source : System.Drawing

Stack : à System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
à System.Drawing.Printing.PrintController.Print(PrintDocument document)
à System.Drawing.Printing.PrintDocument.Print()
à CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
à OptionsCrystal.CrystalReportHelper.Print(Int32 nbEx)



this.SetConnection(this, this.oParams.Server, this.oParams.DataBase, this.oParams.UserLogin, this.oParams.UserPass);

//

if (this.HasSavedData)

    this.Refresh();

//---------------------------------------------------------------

PrinterSettings printerSettings = new PrinterSettings();

PageSettings pageSettings = new PageSettings(printerSettings);

 

 

if (!string.IsNullOrEmpty(this.printer))

{

    PaperSource ps = new PaperSource();

    ps.RawKind = this.bin;

    //                   

    pageSettings.PaperSource = ps;

    if (specialPage != null)

        pageSettings.PaperSize = specialPage;

    //

    printerSettings.PrinterName = this.printer;

    printerSettings.DefaultPageSettings.PaperSource = ps;

    //

    PrintDocument pDoc = new PrintDocument();

    ISCDReportClientDocument rcd = this.ReportClientDocument;

    this.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true;

    if (pDoc.DefaultPageSettings.PaperSize.Height > pDoc.DefaultPageSettings.PaperSize.Width)

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationPortrait);

    }

    else

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationLandscape);

    }

}

printerSettings.Copies = (short)nbEx;

// ajout try catch arround reel Print 18/11/2015

try

{

    this.PrintToPrinter(printerSettings, pageSettings, false);

}

catch (InvalidPrinterException exc)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), exc);

}

catch (Exception ex)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), ex);

}

 

 

this.CloseConnection(this);











Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>