Align field to right in dataport

Is it possible to align an amount (variable dataportfield) to the right in a dataport ? Best Regards, Mark Trouwborst LIMO Automatisering B.V. tel +31 (0)182 631 333

Formatting (alignment) has little to do with the value you are exporting. Is the receiving party expecting a fixed number of digits for the value? Then you could add leading zero’s to the value in the OnBeforeExport trigger. Otherwise be a little more specific, please. John

If you’re using a fixed lenght dataport, you can use the following code in the dataportfield OnAfterFormatField event: OnAfterFormatField (VAR Text:Text[260]) WHILE (STRLEN(Text) < lengthISetTheDataportFieldToBe) DO Text := ’ '+Text; Regards from L.A., – Alfonso Pertierra Spain Western Computer Los Angeles, California

I ran into this issue once when exporting data to a textfile which my client exported to the state Medicare office in New Hampshire. I wrote a little function on a codeunit which could left-fill the string with any specified character: there were three input variables, i.e., the input string, padded string length and the pad character (space or 0— or whatever you need) and the return value was the padded output string. I truncated the output string if the pad length was less than the input string’s length. I called this function from the export routine, which in this case was a nonprinting report rather than a dataport. ------- Tim Horrigan