I want to concatenate the diagnosis code (if more than 1) in the detail tables into one string and put it on a group footer, but my string would only get the diagnosis code of the last detail record only.
You need to use a variable to "accumulate" the string.
In the group header:
---------------------------------
whileprintingrecords;
Global Stringvar gs_result := "";
---------------------------------
In the detail section:
---------------------------------
whileprintingrecords;
Global Stringvar gs_result ;
gs_result := gs_result + " " + {your_string_field};
---------------------------------
In the group footer:
---------------------------------
whileprintingrecords;
Global Stringvar gs_result ;
---------------------------------
Cheers,
- Ido
CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
Hi IdoMillet,
I tried it your way and it worked!
But I got another problem. Since the stringvar
in a calculated field can only be at most 254 characters,
so I couldn't show some of my diagnosis string. Do
you have any way to work around this problem?
Thank you very much for your help!
cdnamm.
Update to CR 9.0 where that limitation was removed
or create two variables and start loading the second one
once the first one approaches the limit.
Another very good alternative is to insert a subreport
in the Group Footer where you display diagnosis codes
for that group in a detail section using the FORMAT option
of "Format with Multiple Columns"...
Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.