Home RAP

Bypassing preview in RAP

edited July 2003 in RAP
Hi,

Could you tell me if this is feasable?

I want to use RAP to bypass the preview of the report but still read the
code I have inside the RAP to select the PrinterName and the BinName. Then
I want to print directly to the printer and bin (Tray) that I assigned in
RAP.

Is this possible and could you give me some hints? I seem to be in a dead
end.

Thanks a bunch!

Dominique

Comments

  • edited July 2003
    Set Report.DeviceType to printer and call Report.Print. The RAP code will
    execute when the report runs. I guess you'll also want to set
    Report.ShowPrintDialog to false since you have your own code to configure
    the printer setup.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited July 2003
    Hi Jim, Thanks for the quick answer.

    Excuse my lack of knowledge of Pascal, but in what event/procedure do I call
    these 3 lines of code.
    I tried to add them in a few different places like BeforePrint and OnCreate
    but it still previews it on the screen.

    Also I get an error when using Report.Print (Expected: '(' or '[', but found
    'Print' instead)

    Also, since the report is generated from a third party, if that 3rd party is
    generating the report to 'Screen' is it possible that this is overwriting my
    RAP code?

    Thanks a lot.

    Dominique

  • edited July 2003
    This would be called from Delphi code for a report, not from RAP code so
    that you wouldn't show the designer. You can't by pass the preview if you in
    the report designer in code. One way to do it from the UI is to use the
    standard toolbar which has a printer icon to print while you are in the
    design workspace. Right click over the toolbar area and select the standard
    toolbar to enable this toolbar.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.