Viewing/printing paperclip attachment in concurrent request output
590575Jun 20 2008 — edited Jun 22 2008We're developing a new process for producing and storing invoices.
Currently a concurrent program is run with certain parameters which in turn submits an rdf which produces xml output for a single or range of invoices.
We use Pasta to run jfmerge to ultimately produce a pdf output file which will have the entire range of invoices.
The new process first submits a pl/sql stored procedure which opens a dynamic cursor based on the parameters supplied. For each row (which contains the customer_trx_id from the ra_customer_trx view) a concurrent program is submitted that runs the rdf executable. Information is stored containing the request_id
And other information in a custom table. A separate concurrent program is scheduled that converts the pdf output to a blob and stores it as a paperclip attachment on the Transaction Header.
If the invoice that is being run is a reprint and already exists as an attachment, then the pl/sql stored procedure submits a different concurrent request that will simply open the attachment.
This process has been developed as a proof of concept in one of our development instances. The problem I'm wrestling with right now is on the reprint portion.
I've been able to construct a url that is displayed in the output file. If I view output, a window comes up asking if I want to save or open. The document is displayed if I open. If however I choose a printer to send the output to when I run the concurrent request, just the url link is printed.
Any idea how to get around this?