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

hightlighting field in crystal reports 8.5

Status
Not open for further replies.

rmcguire80

IS-IT--Management
May 31, 2012
106
US
Hello,

Is it possible to highlight a text field in crystal reports 8.5 based on if the field is not null?

thanks
 
Dont think CR8.5 had the highlighting expert, but even it it does I do not think it can handle nulls.

Try formating field, right click field select format--> Border tab

In formula box opposite background enter

If isnull({yourfield}} then crwhite else cryellow

Ian
 
ok, I tried to do that but the weird thing in my formula editor its not seeing my field? Does it matter if its a memo field?
 
Yes CR8.5 will not allow you to use memo fields in formulae, grouping or any sort of function.

You need to upgrade to CR9 or above

Alternatively create a view on your database which converts memofield to Varchar (255) as that is the biggest field that can be processed by CR8.5. Then use that view in report intead of table.

Ian
 
In 8.5, I think you can type in the memo field in a formula as long as you are only checking for whether it is null. But you should know that you cannot color a null field, because it is not there. You can color the memo field when it occurs, using:

if not isnull({table.memo}) then
cryellow else
defaultattribute

If you want to highlight a null field, you can overlay a text box and then use the null check to color the text box instead.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top