Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select case statement 1

Status
Not open for further replies.

mchambers

MIS
Aug 28, 2008
56
US
Hello
First off I am using a cross tab if that helps.
I have a select statement here below:

Select case {Patient.sex}
Case "M" :
"Male"
Case "F" :
"Female"
Default :
"Unknow"


I get no errors, but the problem is this result:

Total
0%
Male 34%
Male 65%
Total 100%

Why is it only showing the label male?

When I remove the formula I get

Total
0%
F 34%
M 65%
Total 100%

Can anyone help me correct this issue? Thanks
 
Are you 100% sure you are using that Select Case formula as the CrossTab row? Looks to me like you are using something else for it.

hth,
- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Where are you putting the formula? Display string doesn't work for this. You should go into the crosstab expert->select the row field->group options->options tab->customize group name->use a formula->x+2 and enter it there.

Or you could just the formula as the row field.

-LB
 
@lbass

Thanks, it worked great!!! I was sticking in the display field and thats why I was getting it wrong. I add the formula where you said and it worked great. Thanks again!!
 
One more thing. I have a top row with 0%...i dont know why that is there. Can anyone help me with that?
 
Opps never mind I figured out how to suppress them. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top