469,358 Members | 1,502 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Help in crystal reports formula

Hi all,
I have a datafield withthis value
name =john, sudha, chella, honey, etc and I need to display like this
john
sudha
chella
honey
etc. by using formula field. How can i do this
I used split function and some array function. but its not working ? Any suggestions please
My code is

Expand|Select|Wrap|Line Numbers
  1. numbervar number0fcommas := 0;
  2. //checking for commas
  3. if (("," in {ExportView.PalletDimension})= true) then
  4. (
  5. Global StringVar Array dimension := split({ExportView.PalletDimension},",");
  6. number0fcommas := ubound(dimension);//it shows array length correctly
  7. Local NumberVar i ;
  8. Local StringVar str := "";
  9. //this for is not working
  10. //for i := 1 to number0fcommas do
  11. //(
  12. //str = str + split({ExportView.PalletDimension},",")[i] + chr(010)// for line break
  13. //)
  14. //
  15. )
  16. else
  17. {ExportView.PalletDimension};

thank you
Jul 23 '07 #1
2 1981
radcaesar
759 Expert 512MB
Check ur usage of split method
Heres 4 ur ref,

http://msdn2.microsoft.com/en-us/library/system.string.split.aspx
Jul 23 '07 #2
Hi radcaesar ,
Thanks for your reply. I still find difficulties. is that possible to collect the array elements in a string variable using for loop like this
Expand|Select|Wrap|Line Numbers
  1. for i:= 1 to arraylength do
  2. (
  3. local stringvar str ="";
  4. str := str + array[i] + chr(010);
  5. )
  6. str;
  7. //chr(010) is used for line break
if this is possible in crystal reports formula , then i would get my answer;
please reply.
Jul 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Tim Jones | last post: by
3 posts views Thread by chrispycrunch | last post: by
reply views Thread by Timmy Jones | last post: by
3 posts views Thread by Tmuld | last post: by
2 posts views Thread by Franck | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.