Options

Dataport Export On Desktop

KatashikiKatashiki Member Posts: 12
edited 2010-04-21 in Navision Attain
Hi there,

On the dataport properties i have set the filename to C:\Documents and Settings\%username%\Desktop\test.csv but it cannot find the directory. I want the file to be created on the desktop of the user that is running the dataport.

I've tried with several ways but couldnt find anything. Anybody has an idea?

Thanks a lot.

Comments

  • Options
    einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Do you get an error message or do you just don't see/find the file on your desktop?
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • Options
    KatashikiKatashiki Member Posts: 12
    I get a message that indicates that the operating system cannot find the directory specified.
  • Options
    kapamaroukapamarou Member Posts: 1,152
    I think Nav does not understande %username%.

    If you manually enter the path then put the username otherwise make the path using
    ENVIRON('USERNAME') or some other function.
  • Options
    krikikriki Member, Moderator Posts: 9,090
    You cannot put a viarable name in the properties. So "%username%" cannot be used.

    In the OnInitDataport, you can put
    CurrDataport.Filename(STRUBSTNO('C:\Documents and Settings\%1\Desktop\test.csv',USERNAME));
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    KatashikiKatashiki Member Posts: 12
    No success. I'll have to go with C:/test.csv

    Thanks anyway
  • Options
    kapamaroukapamarou Member Posts: 1,152
    Can you show us how and where you set the filename?
  • Options
    KatashikiKatashiki Member Posts: 12
    In the filename of the dataport properties.
  • Options
    kapamaroukapamarou Member Posts: 1,152
    Katashiki wrote:
    I'll have to go with C:/test.csv

    Don't do that. =;

    Some administrators, will not give write access to c:\.

    Put some code on the trigger to set the filename.
Sign In or Register to comment.