Home RAP

Setting the PageHeight for a custom report

edited March 2003 in RAP
I am trying to implement a pos receipt. I think i have a formula to
calculate the page height. (This is very difficult do to the fact that some
of the fields are strechable)

I set the Report.PrinterSetup.PageHeight in the BeforePrint event on the
Report object.

The problem I am having is that the first page is ALWAYS the height set in
the printer setup dialog for the report. The second pageHeight is the
overridden value changed in the BeforePrint event. And, if I return to the
first page after viewing the second page the first page with now display
with the overridden value.

Thanks in advance.
Blake

Comments

  • edited March 2003
    Try setting the page height before calling Report.Print as a test. There is
    some initializatoin that is setting the first page of the report up and it
    may be toolate to try and cahgne the PageDef in the Report.BeforePrint
    event. If you are loading a template, use the public
    Report.Template.OnLoadEnd event (you have to assign the event handler at
    runtime). See the templates thread in the Tech-Tips newsgroup for more info
    on using templates.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited March 2003
    I am not loading a template.
    These are all the events I have exposed at the report level
    AfterAutoSearchDialogCreate
    BeforeAutoSearchDialogCreate
    OnAutoSearchDialogClose
    OnGetAutoSearchValues
    OnEndColumn
    OnEndFirstPass
    OnEndPage
    OnEndSecondPass
    OnNoData
    OnStartColumn
    OnStartFirstPass
    OnStartPage
    OnStartSecondPass
    AfterPrint
    BeforePrint
    OnCancel
    OnCancelDialogClose
    OnCancelDialogCreate
    OnPageRequest
    OnPreviewFormClose
    OnPreviewFormCreate
    OnPrintDialogClose
    OnPrintDialogCreate
    OnPrintingComplete
    OnSaveText

  • edited March 2003
    Try setting the page height before calling Report.Print- what is the result?


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.