Page 1 of 1

Problem with custom text format

Posted: Mon Nov 17, 2008 7:18 am
by Jennypi
In my database a field shows a code like this:
lllnnnnnnnnlll (l=letter ; n=number)
I would like to display it formatted like this:
lllnnFnn-nnnn/lll (meaning that I want to insert a "F", an "-" and a "/")
I can't find how to do it, either by using Text Format dialog box or by programing with format function.

Could you please help me?

Thanks,
Jennifer.

Problem with custom text format

Posted: Tue Nov 18, 2008 7:46 am
by Jennypi
Any help please?

Problem with custom text format

Posted: Tue Nov 18, 2008 8:05 am
by Edward
Hi, Jennifer.

Please write the following in the Text expression:

Code: Select all

{MyDataSource.MyDataColumn.Substring(0,5)+"F"+ MyDataSource.MyDataColumn.Substring(4,2)+"-"+MyDataSource.MyDataColumn.Substring(6,4)+"/"+MyDataSource.MyDataColumn.Substring(10,3)}
MyDataSource.MyDataColumn is the name of the field in that datasource in Dictionary.

Thank you.

Problem with custom text format

Posted: Tue Nov 18, 2008 8:12 am
by Jennypi
It is working perfectly!
Thanks a lot, I'm learning !:biggrin:

Problem with custom text format

Posted: Tue Nov 18, 2008 8:19 am
by Edward
You are welcome, Jennifer :)