Adding a File Requst to a Textbox on the Report Request Page

Matt.HillMatt.Hill Member Posts: 32
Does anyone know if it is possible to have filename request functionality to a Textbox shown on the request form when processing a report (as the user has the option to export as CSV). At present the user will have to have a knowledge of direcotry structure to be able to use it - it is safe to assume that the end user will have no such knowledge.

I've tried the suggestion for when using "dataports and the request dissapears", but this does not work! All I have now are assist edit dots that do nothing!



  • Options
    ArhontisArhontis Member Posts: 667

    I don't get the "dataports and the request dissapears" comment...

    If you want to have a text box that a user can enter a path and a filename for you to save the report, you should create two vars:
    afilename Text
    aDlg        OCX Microsoft Common Dialog Control, version 6.0

    Place a textbox on the request form, make AssistEdit=Yes in its properties, select it with the mouse, press F9 to view the code and in the OnAssistEdit trigger place the code:
    WITH aDlg do BEGIN
      DialogTitle := 'title of your dialog';
      Filter := 'file type1 (*.OUT)|*.out|file type2 (*.txt)|*.txt|all files (*.*)|*.*'; 
      IF FileName <> '' THEN 
        afilename := FileName;

    In case of 'Design Time License' of the comdlg32.ocx you should look at:
  • Options
    ArhontisArhontis Member Posts: 667

    I saw the post in mbsonline about the 29 Export Acc. Sched. to Excel implementation. Using the Common Dialog Management codeunit would be much better.

    Its the same without having to do it yourself!!
  • Options
    Matt.HillMatt.Hill Member Posts: 32
    Thanks to all - the second idea did the trick, as the first one failed with the missing licence error....
Sign In or Register to comment.