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.
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)
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?
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 ...
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 !!!!
Comments
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>
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).]
Trusted Business Information Systems, Inc.
<email>wbinford@trustedbis.com</email>
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 Netherlands
Qwinsoft BV
The Netherlands
[This message has been edited by SimonW (edited 25-02-2000).]
Any suggestions?
Dennis
[This message has been edited by Dennis (edited 01-03-2000).]
Qwinsoft BV
The Netherlands
regards
Craig Needham
Is there a solution?
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.
<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 ?
Ludo
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
NAVIConsult
dynamicsblog.mbstn.com