Rehi Is it possible to write more than one file at a time with one Dataport? I export data in one file but i want to make a Logbook in another file. Maybe it is just possible to write in a file without overwrite it (add lines) ?!?! Any suggestions? THX Ben Benjamin Crause firstname.lastname@example.org Germany
Could be, I never tried and never needed this. I think this is the wrong approach. You might consider the following ideas: 1) Create as many dataports as you need files and call them from a form one after the other. So for the user it would still appear like ONE job to start 2) Why do you need several files? You can include several Navision Tables into one dataport. 3) You might consider using a non-printing report or a codeunit rather than dataport(s). This gives you full access to the files. Dataports are IMHO only suiteable for quick-and-dirty imports/exports Marcus Marcus Fabian phone: +41 79 4397872 email@example.com
It’s possible to write more then one file during dataport processing. Not at the same time but sequential. You can use CurrDataport.FILENAME := ; … and after some processing CurrDataport.FILENAME := ; And you’ll get your data in two different files. If you want to write two files simultaneosly eou do not need to use dataport. You can use file variables. Const.
- Create as many dataports as you need files and call them from a form one after the other. So for the user it would still appear like ONE job to start << Sometimes the number of dataports it’s really important, as the license file just allows a number of dataports to be used. BTW, sometimes you’ll need reading some different files that has the same structure (example, having the customers data in a variable number of different files) and it’s a cleaner way having just a dataport that control those files and imports the data from all of them than having multiple calls to the same dataport for each file. >>2) Why do you need several files? You can include several Navision Tables into one dataport. << For example, importing customers’ invoices… you’ll import the headers and the lines in a single dataport if u want. And it allows you an easier error handling. Regards, – Alfonso Pertierra firstname.lastname@example.org Spain