Formatting: How to group a string-output..?

0

Hi again,

in my report I've to print an IBAN-code. This is a quite long string with varying length (between 20 and 30 chars. approximatly). For reading, it is better to print it in groups of 4 chars.
I don't think, there is a ready-made format function for this ... but I'm only a iReports-maker, not a java-programmer...  perhapes I can get help here? smiley

thanks for any help

toxy

this is it, I would need:   AT363471100000060815 --> AT36 3471 1000 0006 0815     (iReports 4.5.1)

toxy's picture
36
Joined: Sep 11 2006 - 7:34pm
Last seen: 5 years 9 months ago

1 Answer:

0

Try $F{MyField}.replaceAll("....", "$0 ")

HTH,

Lucian

lucianc's picture
7075
Joined: Jul 17 2006 - 1:10am
Last seen: 1 week 2 days ago

Works perfectly!
Many thanks!

toxy

toxy - 6 years 3 weeks ago
Feedback
randomness