Replace Information with Symbol

When we print our paychecks from NAV it includes the employees bank account number. Our HR department has decided that this is not necessarily the best practice and would like have that information replaced (except for the last four characters) with an asterisk. I’ve tried using PadChar and PasswordText properties on the report but it doesn’t yield the desired results. Any ideas?


Try this test:

TestString := ‘1234567890’;
TestString := COPYSTR(TestString, 1, STRLEN(TestString)-4) + ‘****’;