allow user to save file to a particular directory

xscottehx

Member
i have a procedure that outputs a list of names and details about colleagues how do i get this to then output to a file but that allows the user to choose wether to save or open the file and choose where to save it. I have tried using export command but it doesnt seem to work is there any special syntax i need to use. I am using OE 10.2c OS is windows XP

Thanks
 

lord_icon

Member
Greetings Dude,

In a Windows GUI environment, look at using the SYSTEM-DIALOG-BOX ,.
This will use the os(windows) native dialog box to select a source / destination location.
 
You might consider using .net to do this. I used System.Windows.Forms.SaveFileDialog and it was pretty easy.

You can find examples of this pretty easily for c# and all you have to do is change the syntax around to get it to run from progress.
 

lord_icon

Member
Work with this syntax.
It is a fully working example, make it fit your needs.
Good look.

DEFINE VARIABLE procname AS CHARACTER NO-UNDO.
DEFINE VARIABLE OKpressed AS LOGICAL INITIAL TRUE.

Main:
REPEAT:
SYSTEM-DIALOG GET-FILE procname
SAVE-AS
TITLE "Choose Procedure to Run ...".
IF OKpressed = TRUE THEN
RUN VALUE(procname).
ELSE
LEAVE Main.
END.
 

xscottehx

Member
Sorted.

Instead of using export i used webspeed to output values comma seperated and changed the output type to text/plain. and in the URL used .csv instead of .p.

:D
 
Top