File Dialog in Dataports

Paul_Bradbury
Member Posts: 15
I am using the userrequestform in a dataport and am using a field to enter the filename. Can anyone tell me how to code the file dialog (ie. used to browse the disk for files) which is displayed automatically when the userrequestform is not used.
0
Comments
-
This is the trick:
1. Create a global variable eg. Filenametext with length 250
2. Place a textbox on the requestform with source-expression your variable eg. Filenametext
3. Renumber the ID of the control to 1
4. Place a label on the requestform with caption 'Filename'
5. Insert this line on the PreDataport trigger:
<code>CurrDataport.FILENAME := Filenametext // (Filenametext is the source expression of TextBox ID 1)</code>No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Does anybody know how to do the same thing for a report? Is it possible to get access to the File Dialog box other than through the above trick?
For example, if I want to export a report as a delimited file, how do I give the user the ability to easily choose where to put that file?
-Weston
Weston M. Binford III
Trusted Business Information Systems, Inc.
<URL=http://www.trustedbis.com>www.trustedbis.com</URL>
<EMAIL>wbinford@trustedbis.com</EMAIL>
[This message has been edited by Weston Binford III (edited 25-02-2000).]<b>Weston M. Binford III</b>
Trusted Business Information Systems, Inc.
<email>wbinford@trustedbis.com</email>0 -
To do this you must create the following variable:
FileDialog OCX Microsoft Common Dialog Control, version 6.0
Then you can use code like this:
FileDialog.DialogTitle('Select document');
FileDialog.Filter('Worddocuments *.doc)|*.doc|All files (*.*)|*.*');
FileDialog.ShowOpen;
IF FileDialog.FileName <> '' THEN
newFileName := FileDialog.FileName;
Succes
Dennis van Es
PerCom: Research & Development BV
The NetherlandsDennis van Es
Qwinsoft BV
The Netherlands0 -
Sorry - didn't mean to post this entry
[This message has been edited by SimonW (edited 25-02-2000).]0 -
The method with the MS Common Dialog Control requires a Design Time License Version?!
Any suggestions?0 -
You only need on ocx-enabled licence for compiling the object. Once the object is compiled you (reed your client) don't need it anymore.
Dennis
[This message has been edited by Dennis (edited 01-03-2000).]Dennis van Es
Qwinsoft BV
The Netherlands0 -
Thank you Dennis for that tip. I was wondering about it as well :-)
regards
Craig Needham0 -
The OCX you mentioned works fine if you want to select a file, but not if you only want to select a directory.
Is there a solution?0 -
With regards to Stefan's note.
I too have the design time license problem. My Navision license allows OCX, so I asume its a microsoft license for using that OCX. I know OCX Controls can have embedded license security. I don't know much about this subject, can anyone clear this up for Stefan and myself?
Regards Craig.0 -
To clear up. It 's like Dennis said in a previous note :
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dennis:
You only need on ocx-enabled licence for compiling the object. Once the object is compiled you (reed your client) don't need it anymore.<HR></BLOCKQUOTE> But some OCX's require an additional design time license.
In standard NF you have the same problem with CU 397 Mail which is using Microsofts MAPI ocxes. In other to test :
- export the codeunit as a fob (backup)
- recompile it : if does not succeed, you will get the same message. In this case installing Visual Basic (e.g. VB 5.0) will solve your problem. The design time license for the MAPI ocx is included there ...
Clear enough ?
Ludo0 -
another way without OCX is
to use Import.
The problem is that you cannot put an variable of a BLOB
but you can use a variable of a Record with Temporary
e.g(one table with an BLOB field)
VAR TempItem Record Item TEMPORARY = TRUE
Filename := TempItem.IMPORT(TempItem.Picture,TRUE) =
open an Dialog -> the import is temporary !!!!
nice greetings
Gayer Rene
Projektmanagment
NAVIConsultRene Gayer (MVP)
dynamicsblog.mbstn.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions