vik.patil
14th April 2018, 05:40
Hi All,

We are extracting .csv file out of Baan IV Standard Report/Session and we don't have source code so unable to add field as File path so we need to save this file local machine with User's choice of Path. We have tried with dir.select.dialog.local() but getting compilation error. We have first tried with #include <bic_desktop> but got compilation error so switched to #pragma used dll "ottdllbw" but still we are not able to compile script for this function. Other function as Server2Client is working fine with ottdllbw.

Do we have any other function/option to save file on local machine without hard coding file path.

Any help will be appreciated.

Regards,

Vikram Patil

bdittmar
14th April 2018, 11:35
Hello,

file.mv.across.hosts()
Syntax:

function long file.mv.across.hosts (const string source, const string target)

Description

This moves a specified source file to the location specified in the target argument. The file can be either local or remote. Source and target can be on different hosts.

Arguments

const string source Source file.

const string target Target file.

OR (Not avaiable in BIV)

seq.saveas.dialog.local()
Syntax:

function long seq.saveas.dialog.local (string defaultname, string directory, string filter, ref string filename)

Description


This shows the Windows file save-as dialog, to allow the user to select a new or existing local file to be saved.


Arguments

string defaultname The default filename shown in the file save-as dialog.

string directory The startup directory for this dialog. In case of an empty string the "My Documents" directory will be the default. This parameter may include the string ${BSE_TMP} which indicates the ${BSE}\tmp directory in case of Baan Windows or Windows temp directory in case of Webtop.

string filter This argument specifies all possible file extensions for the file. The string must contain pairs of strings that are separated by a "|" character. The first string in each pair is a filter name (for example: "Text Files"). The second string must be a filter patern (for example: "*.txt"). Multiple filter patters can be specified by separating the filter patterns with a semicolon. Example: "All Files(*.*)|*.*|Text Files(*.txt) Word documents(*.doc)|*.txt;*.doc"

ref string filename Output argument which will contain the full path of the file selected by the user.


And have a look at : http://www.baanboard.com/baanboard/showthread.php?t=513&highlight=ttstpconv&page=3

Create a print device with your own converter that's using ttstpconv
(I've done in 2002 and ported from BIV to LN in 2010, does't work with Ming-LE an LNUI, but with Worktop and BECS)

Regards