Unanswered: Change of behaviour in CRXIR2 (RDC Programming)
I have a problem with a custom paper size defined in Windows; it is defined as having the same width of an A4, but half the height.
I have an RPT file created with Crystal Reports XI Release 1. I load it to a Report object using the Application object as follows (version 11 of the RDC):
Set objApplication = New CRAXDRT.Application
Set objReport = objApplication.OpenReport("C:\MyReport.rpt")
objReport.PaperSize = CRAXDRT.CRPaperSize.crPaperA4
CRViewer1.ReportSource = objReport
I wanted the RPT file to be printed with the custom paper size, and I had to choose the new size using a CRViewer dialog (that special size was created using the Windows's Printers feature). I was able to see the change in paper size in the viewer, and when printing (and the printer had A4 paper sheets), the first page of the report was printed on the first half of the paper, and the second page on the second half of the paper -all as expected.
When pressing the Print button on the viewer, the PrintButtonClicked() event, I provoke the printer setup to appear:
After that, it is printed by using the Print button inside the Print Setup Dialog.
After installing CRXI Release 2 (version 11.5 of the RDC), the behaviour of the printing changed: After changing the paper size, and being able to see this change in the viewer, a whole paper sheet was used for each page of the report (therefore wasting paper); that is, the custom paper size was not used but the A4 instead.
If I click the "Printer..." button inside the report Print Setup Dialog, the Windows's Print Setup Dialog appears and I was able to coerce the report to used the custom paper size; but this is an extra step and I would rather have the previous behaviour.