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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric field under string caption 1

Status
Not open for further replies.

Ladyazh

Programmer
Sep 18, 2006
431
US
I have a numeric field.
I need to have it as a parameter.
If Y then show everything,
if N shoe only 0s.

I set it up as 1 as Y and 0 as N.

Now how do I show captions in Crystal so user will see Y and N and not numbers? Thanks
 
Try:

Report->Selecton formula->record;

If{?Parm} = "Y" then
{table.field} = 1
else
{table.field} = 0

Check out my FAQ for advanced theory:

faq767-3825

-k
 
Hi!
I had probably said it wrong.
If{?Parm} = "Y" then // {?Parm} is numeric field so it is not ='Y' it is 1

It goes like this
If Y show all Numbers else If N show only Zero values

 
Sorry {?Parm} can not be "Y" - it is numeric and default for it is number.
 
Field CoName
0 A
0 B
1 C
2 D
3 E

If {?Field}<>0
then {t.Field}={?Field}
else
If {?Field}=0 then
true

I works well.

Now I need to find way to have user to choose not from 0,1,2,3 but Y and N

thanks
 
Create default values in the parameter and place the letters in the description side and select show description only.

-k
 
WOW! that was esy wasn't it? Never knew this!!! THANKS a million!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top