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

Crystal 8.5 Formula to bold a duplicate item

Status
Not open for further replies.

tib97

IS-IT--Management
Jan 28, 2005
4
US
I am working on a report that shows animal id numbers and system generated treatment numbers. I have some animal id numbers that are duplicated because there is more than one treatment number associated with it. I would like these animal id numbers to be BOLD so that they are easy to spot. Currently my formula to convert the id numbers into text and bold them is as follows: if previous ({animal.animal_id}) = {animal.animal_id} then CRBold Else ToText ({animal.animal_id})
This is where I get stuck. When I check the formula, it says I need a number and cursor is right before the ToText statement.
Can anyone help? It would be much appreciated!
Thanks!
Theresa
 
ToText() is looking for a number in the field specified and can't find one.

check the field type of {animal.animal_id}. it actually may be a string in the database.
 
Illuninatisucks...

First off...LOVE the handle! :)

Checking in Ent Manager, says the field is varchar. I tried taking out the ToText statement but am still getting the needs a number error.

Thanks!

Theresa

 
haha! very few people recognize the handle.

re-reading your formula, it looks like if {animal.animal_id}) = {animal.animal_id} doesn't hold true, you just want to display the id. is that right?

i don't think you need to put in the else statement. is there more code that goes along with what you posted?

what happens if you leave out the else:
if previous ({animal.animal_id}) = {animal.animal_id} then CRBold
 
IS...

Angels and Demons, right? :)

The software vendor that uses Crystal finally got back to me and we got it fixed. They used the conditional formatting function in the report for font and the formula is this: If Count ({animal.animal_id}, {animal.animal_id}) > 1 then crBold else crRegular

So I was way off...but thanks for your help!

Theresa
 
well, angels and demons is one story about the illuminati. basically, if there is an illuminati controlling the world then they are doing a sucky job. hence, illuminatisucks.

i am glad it got sorted out. i didn't even know about 'crRegular'. i will have to keep that in mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top