Printing and/or displaying/editing IBAN?

Author: (sochaz)


we need to print an IBAN (i.e.International Bank Account Number). At the first sight, it seems to be quite easy task, since it is just a common string wich contains only numbers and upper-case characters.

Citing wikipedia: "The IBAN should not contain spaces when transmitted electronically. However, when printed on paper, the IBAN is expressed in groups of four characters separated by a single space, the last group being of variable length..."

This meas, for example, for IBAN like XX1234567890 it should be printed as "XX12 3456 7890". It has a fixed lenght for each country and maximum is 34characters. We tried to use a display format like "DIS(???? ???? ????)", but in Uniface, display format is limited to 31characters only.

My question is, how do you achieve to print IBAN in standard format? Do you use some dirty tricks to do this? For example, in France, IBAN is 27chars long, which means, we need 6 spaces, that is 33chars to be placed in DIS() format.


1 Comment

  1. Hi Zdenek,

    I recommend an IBAN-display field which will be filled the following way:

    entry IBAN_tostring
       string IBAN_input : IN
       string IBAN_work ; OUT
    while (IBAN_INPUT != "")
       IBAN_work = "%%IBAN_work%%% %%IBAN_input[1:4]" ; whach the space in the middle
       IBAN_input = IBAN_input[5]
    IBAN_work = IBAN_work[2]
    end ; IBAN_tostring

    Or you can use the conversion in the FORMAT trigger of your IBAN field
    and remove all spaces in the DEFORMAT trigger again.

    Success, Uli


    Author: ulrich-merkel (