How to download a file using Webspeed

JeffCook

New Member
Hi Webguy,

That worked. I had to play with the calls a little bit as my query builds a temptable. I've got it putting out the file and it prompts for the download.

The problem I'm running into is that the original page that the download button is on is getting it's html code put into the .csv file. How do I keep that from happening?
 

JeffCook

New Member
It was being caused by the way my business logic was setup. I've got the query results stored in a temp table and I had to set up the BL code to run the download if the action is "Download" else run the query page.

Code:
/*sample code - outside(after) of checking if "POST" or "GET" */
if cAction = "download" then do:
    run downloadOrders.html (input ttrpt).
    cMessage = "Download complete".
end.
else 
   run getorders.html (
      input ttrpt,
      ...
      input cMessage).

Thank you to everyone for your help AND your patience. I've learned (and re-learned) a lot getting this to work.
 
Top