Hi guys,
I have a big problem and I need our help....
I'm converting an old VB6 program to .NET but I can't replicate a VB6 behaviour into .NET application.
The VB6 application use Crystal Report 11.5 while .NET application (VS2010) use Crystal Report for .NET (Support Pack v.13.0.13.1597)
This is the situation:
the report that I use has the flag "no print" checked and has a specific dimension (10cm X 8 cm):
The "Printer Setup" options:
This special report (is a little label) is printed with a particular printer that has this setting:
The report must be printed with the dimension 10x8 (the label has this dimension).
When open in preview this report with VB6 application (through CrystalReportViewer), the printer selected has the "report dimension":
When open in preview the same report with .NET application (through CrystalReportViewer.NET) the printer selected has his original dimension:
The report is the same and the printer is the same too.
Both programs set the name of the printer, paper size (= A4), duplex (default), paper orientation (landascape) and nothing else...
The .NET code is this:
----------------------------------------------------------------------------------------------------------------------------------------------------
Private _myCRDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
_myCRDoc = New CrystalDecisions.CrystalReports.Engine.ReportDocument
_myCRDoc.Load(rptPath, CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy)
_myCRDoc.PrintOptions.DissociatePageSizeAndPrinterPaperSize = True
_myCRDoc.PrintOptions.NoPrinter = False
_myCRDoc.PrintOptions.PrinterName = printerName
_myCRDoc.PrintOptions.PaperSize = PaperSize.PaperA4
_myCRDoc.PrintOptions.PrinterDuplex = PrinterDuplex.Default
_myCRDoc.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape
Friend WithEvents Visualizzatore As CrystalDecisions.Windows.Forms.CrystalReportViewer
Visualizzatore.ReportSource = _myCRDoc
Visualizzatore.Show()
----------------------------------------------------------------------------------------------------------------------------------------------------
(the VB6 code is similar)
I don't understand how VB6 application can modify the printer dimension.
Can CR.NET modify that setting?
Thanks in advance
Francesco




