Follow me on Twitter

A technical eye on Microsoft Dynamics NAV

Quick Tip: Adding a CR/LF to Dataports

in Quick Tips by Ian Crocker


Photo credit: Jessica Donohoe

Need to add a carriage return/line feed at the end of a Dataport?

You can do this by adding the following code in the OnPostDataport() trigger where Ascii is a variable defined as type Char

Ascii := 13;
CurrFile.WRITE(Ascii);
Ascii := 10;
CurrFile.WRITE(Ascii);

The first two lines write a carriage return to the exported file.

The final two lines write a line feed.

No Comments

Leave a response

What's cooking?

Photo credits

View Ian Crocker's profile on LinkedIn