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

Conditional Formatting on Crosstab Report

Status
Not open for further replies.

abundantlyfe

Technical User
May 21, 2007
8
GB
Hi,

I have a crosstab report and I'd like to apply conditional formatting to the results (main body) of the report.

I would like the results to be bold and red if the DON'T contain a "<" before the number.

Is this possible? And how would I go about doing it?

Many thanks

AL

You can call me AL
 
What sort of field? If it's a string, then a normal field could be modified by testing Left({your.field}) = "<". Right-click on a field and choose [Format Field], then set the test for Font.

This should work for a Crosstab in Crystal 10. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
IS the summary field a string? If so, you would have to use a formula like the following in format field->font->color->x+2:

if instr(currentfieldvalue,"<") = 0 then
crRed

You would have to place a separate formula in the font style formula area:

if instr(currentfieldvalue,"<") = 0 then
crBold

-LB
 
Hi both.

Madawc - you're in East Anglia too - cool! :eek:)

I am working with Crystal 11 for ESRI, and the field is a string. I'll remember to put that info in next time.

I did something similar to what you were suggesting, and it changed the colour of everything!

Ibass - that worked perfectly! Thank you. Exactly what I needed.

being new to Crystal I'm assuming that it has it's own language. Is that right?

Many thanks again.

AL

You can call me AL!

Crystal Reports for ESRI v 11
 
Crystal is a report tool, not a language. You can get a neat report using it, and accepting that it has its own structure that you need to work within.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hey Madawc

I understand that. I think I was a little ambiguous!

I meant for things like the conditional formatting, where you have to type in a code. Is that vb? Or is it specific to Crystal reports?

:)

Thank you for your help.

AL

You can call me AL!

Crystal Reports for ESRI v 11
 
In Crystal, get hold of the the formula icon (x+2 and a pencil).

Once in, get the 'function tree'. Generally the second cog under 'functions' has the specific commands, which you can just click on.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
There are certain functions like "currentfieldvalue" that can only be used in formatting formula areas (including formatting for crosstabs) within Crystal. The gridrowcolumnvalue() function is specific to crosstab formatting.

-LB
 
Fantastic.

Thank you very much guys. I really appreciate the help you have given me. It's a boost to get started.

Have a great weekend.

AL

You can call me AL!

Crystal Reports for ESRI v 11
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top