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

Change the Description

Status
Not open for further replies.
Sep 16, 2005
191
US
Why is my if then not working?
Basically, I want to change the description that is in the database to a text that I wanted to call..
so I wrote this formula..
If {TB_Service.Result} = '9900'
then {TB_service.description} = "Payment"

My resulte equal "False"

I also try :
If {TB_Service.Result} = '9900'
then "Payment"

and I got blank as the result.. What is wrong???Please help..
 
Try:

If {TB_Service.Result} = '9900' then
"Payment"
else
{TB_Service.Result}

-k
 
Hi,
You cannot change data in a database field using Crystal Reports..If you want to display a 'translation' of a code field, then the formula would be something like:
Code:
If {TB_Service.Result} = '9900'
then "Payment"
Use this formula instead of the actual field in the report
to display 'Payment' whenever {TB_Service.Result} = '9900'
--IT will be Blank for every record where {TB_Service.Result} <> '9900'

You can add more tests ( or use the Switch function) to translate more values if you want..






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks but it still does not work. I am trying to change the translation in Crystal not the database..

I try this: If {TB_Service.Result} = '9900'
then "Payment"

And my result is blank..

I also try
this: If {TB_Service.Result} = '9900' then
"Payment"
else
{TB_Service.Result}

and result is displaying {TB_Service.Result} and I know I have one that should be displaying "Payment"
 
Crystal doesn't misrepresent data unless there's some connectivity concern.

For instance using Oracle's ODBC driver can cause difficulties in other versions, this is more likely that you misunderstood the data because it's trimmed or padded.

-k
 
AlreadyLost,

When you figure something out and need no further help, please share it in the thread--otherwise the thread doesn't help other readers learn from your problem.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top