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

How can I change word in Crystal Report ?

Status
Not open for further replies.

warning99

Programmer
Joined
Nov 5, 2007
Messages
53
Location
SA
HI THERE ..

I want to change results in my report..

For example when my report show number ('9') in
cars column . I want write condition to replace
number ('9') in cars column to ('BMW')

HELP ME PLEASE :(
 
Create a formula called {@Cars} use this to replace the numbers with any text you prefer. For example:

//Replace numbers with text

IF {yournumber.source}= 1 THEN 'Mercedes' else
IF {yournumber.source}= 3 THEN 'Hummer' else
IF {yournumber.source}= 5 THEN '3 wheel Trotter Van' else
IF {yournumber.source}= 7 THEN 'Bicycle' else
IF {yournumber.source}= 9 THEN 'BMW' else
'No Vehicle Listed'


Have fun


'J


 
Are you sure you do not have a table whih contains this information. It would be better to link this table in rather than trying to hard code in report. Otherwise everytime you want to add another make of car you will need to update the formula suggested by CR85user.

Ian
 
MR.CR85user

Thank you. But how can I create formula? ,step by step please because i am beginner.

2- Is yournumber a column name ?
Thank u :)

Mr.IanWaterman
Yes .But my Database is stuped!! I have big table
contain evry things. In rows 90,91 and 92 contain
grades(V-Good,Good,avarage) but as numbers!!
Thank u :)

Soooorry i have poor English :((((((((
 
Click on the 'Insert' menu at the top of the screen, select 'Formula Field'

Click on the button labelled 'New' when you hover over it.

write in the the formula you wish. If for example your database is called messydbforcars and the field (column) is called cartypes then you would write:

IF {messydbforcars.cartypes} = 1 THEN 'Car type 1' else
IF {messydbforcars.cartypes} = 2 THEN 'Car type 2' else
'No car type'

etc etc - replacing obviously your field name, car descriptions etc.

I would strongly suggest looking at some of the sample reports and guides available to get you used to how to use basic crystal functions.

'J
 
Thank u .. it work now ..

u have samples reports used formula ?

thank u again man :)))))
 
There are sample reports with your CR installation disk. YOu will need to copy the sample database too for them to work.

YOu can also go to BusinessObjects.com and on support search knowledgebase for sample reports and it will take you to a download.

Ian
 
Mr.IanWaterman


Thank you :))

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top