Common Dialog Management/File Open

halldinhalldin Member Posts: 5
edited 2003-09-22 in Navision Attain
Hello

I want to use a dataport/report to go through a textfile from the Navision Localisation Workbench in order to clean it from transactions existing more than once in the file(probably an error in the NLW application).

In my report/dataport I want to use two (2) dialog boxes in the request form, one for "file open" and the other for "Save as" in order to create a new file containing only the ML texts.

I have problems using two dialog boxes. I have set the first one with parent control 1 and thus using standard functionality to import (read)the first file - this work s fine.

I have problems having the second text box to work and set the filepath and filename to the file i want to create. I can open the dialog box but when i point at a location and write the file name to save, and say OK the dialog box does not pick the filepath into the request form.


Any Ideas anyone?
Best Regards
Lars Halldin

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I guess the reason you don't get the filepath is that the standard DialogBox is used for selecting files, and not paths. Try using this one instead: http://www.mibuso.com/dlinfo.asp?FileID=169

    Now that I read your question again, it seems you are selecting a path & filename. Why don't you show us some code how you call the dialog box, and retrieve the filename?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • LG_HellströmLG_Hellström Member Posts: 13
    Tried OCX Microsoft Common Dialog Control, version 6.0 ?
    ComDialog32.DefaultExt('scp');
    ComDialog32.Filter('FTP Scriptfiles (*.scp; *.txt)|*.scp;*.txt');
    ComDialog32.FileName("FTP scriptfile Get");
    ComDialog32.ShowOpen();
    IF ComDialog32.FileName() <> "FTP scriptfile Get" THEN BEGIN
      VALIDATE("FTP scriptfile Get",ComDialog32.FileName());
    END;
    

    Naturally .ShowSave(); will be of interest..
    (No, I haven't got control of "Cancel" from user action as of yet)
    Did I commit today?
Sign In or Register to comment.