Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2003

    Question 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.Database.SetDataSource objADORecordset
    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:

    objReport.PrinterSetup Me.hWnd

    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.

    Any ideas about how to solve this?

    Thanks a lot in advance.
    Last edited by EMoscosoCam; 12-07-06 at 19:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts