Hello,
I have a simply CR project that lists the people's names, and their respective info, contained in a DB.
Since there are a lot of items to list, I was wondering if I could make the list horizontally shorter, so that I wouldn't have to make the letter size even smaller.
I tried using a code given as an answer of a post on this forum:
To get first name using
right({table.name},len({table.name})-instrrev({tabla.name},','))
To get last name using
left({table.name},instr({table.name},',')-1)
But when I check the preview, it gives an error. It says the length of chars is less than 0 or it isn't a number, probably because there are no commas in the names of my BD. They're simply like:
João Augusto da Silva Santos
Marco Alexandra Ferreira dos Anjos
Mariana Filipa da Costa
....
other thing I tried, also used as an answer by a post on this forum, was:
For 1st name:
StringVar Array x;
x:=split({Alunos.NomeFo},(if instr({Alunos.NomeFo},",")=0 then " " else ","));
x[1];and it works perfectly.
Problem is getting the last name... I can't use the same code since the names are as forementioned. First, there are no commas in the names of my Database, 2nd, in Portugal most names have "da", "das", "do", dos" in the middle of the name, and 3rd, of course they are not all of the same size...
Is there still any way I could get the 1st and last name on this case?
Help is appreciated.
Thanks
Edited by Goldberg - 10 Nov 2011 at 1:49am