on 01-23-2014 9:04 AM
Hi,
I am using crystal reports 2011 to display report having bar chart. Chart has only one series which is used to diaply names.
My requirement: If name contains string "abc" then change the bar color to red.
Color highlight helps to change the color conditionally. But I am not able to check if String contains sub string with. i.e. "pqrabc hds" contains "abc".
As a solution I decided to use another field "color code" with original field "name". So that I can conditionally change the color using field "color code".
To have "color code" in value of section in color highlight, you need to use it as data input of chart. After doing that my bar chart displays 1 bar for name and 1 bar for color code.
Can I hide all bars related to "color code"? As I am using it just to conditionally change the color, I don't need them while displaying the chart. Neither I want blank spaces instead of bars.
Any other Ideas or suggestions to change the bar colors as per my requirements?
Thanks You.
HI Rutvi,
Crystal Reports does not let you use a 'formula' to conditionally color a Bar Chart.
If you add multiple fields to the 'Show Value' section, you will see two bars for each name. There's also no way to get rid of one of the bar (other than removing it).
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rutvi,
Is there any metric(number) being displayed on the chart in the 'show value' box of the 'chart expert'.
generally, charts are used to show numbers w.r.t a changing attribute like a month,year,region,country etc.
The color highlight would only work for a metric series , for e.g 1-to-100 show green, 101-to-200 show red etc. It will not work for a string field.
It is not very clear why a string content needs to be shown as a 'red' or 'green' on a bar chart.
-Prathamesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.