Hi Ian,
You need to step back a moment here.
when you print a report, and send to the browser, then it goes something like this;
a) create a link, or button, that points to a URL containing the report procedure name.
b) when the user clicks the link, that url is sent to the server, which passes the request to the report procedure, which then sees the p_web parameter and creates the file and sends it.
What you want is completely different.
a) create a link or button on a form with no URL.
b) when the user presses the button show a note saying "ok, will do".
c) then call the report procedure -
d) when that's done call the emil procedure.
So the code on the button looks something like this;
p_web.script('alert("okay");')
p_web.replyComplete()
filename = whateverReportProcedure()
! set email parameters here
SendEmail()
Of course where the whatEverReportProcedure stores the file is up to you. In the above case it passes the name back to you, but you can use any mechanism you like to get the name back.
Then set up the email parameters (see Sending Email example) and call that.
cheers
Bruce