If you want the replacement globally for the entire application, then the best place is in the beginning of the program in function main().
RPreview():bPrint := <block>
If you want only for a single report, anytime before activating the report:
RPreview():bPrint := <block>
After printing the report
RPreview():bPrint := nil
G. N. Rao.
Hyderabad, India