How Do I Add a Target Line to a Chart in Crystal Reports 2008?
|Over the last month or so I have been asked a number of times how do I add a target line to a chart in Crystal Reports 2008.|
- Create the chart as required
- Select the Y-axis of the chart
- Right click on the Y-axis, select the menu option Data (Y) Axis
- In the Data (Y) Axis Setting dialog box, click on the Gridlines Tab
- Add a tick to the Draw Custom Line at option
- Add the required value in the text box
- Press the OK button
To format the Target Line:
- Select the Target Line
- Right click on the Target Line, select the menu option Format User Line
- In the Format User Line Dialog Box, apply the required formatting
- Press the OK button
If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us
|I followed these instructions step by step and the target line will not show up on my graphs! The target is saved in the Data (Y) Axis Setting dialog box, but nothing is showing up. I tried restarting and refreshing but nothing is working. Any suggestions?|
Thank you for your comment.
Just a couple of things, to check:
When the target line was added, is the value greater than the minimum Y axis value?
Did you enter the full value, and not the abbreviated value, i.e. 600000 and not 600K?
Is the target line value the same as either the minor or major gridline value?
Did you format the target line, so that it is different from the gridline?
Hope this helps
|Thanks for the instructions...works well for me. |
Is there a way to display the y value of my line without changing the y axis in general?
|Instead of put a fixed value, is it possible to make it dynamic? Adding database field, for example.
The only way around this would be to create a parameter, that allows the user to enter a value.
Then create a formula, which is based on the parameter value.
In the Chart Expert and add the formula field to the Show Values section and deselect the Don't Summarise option
Right click on the Target bar, and select the Series Option.
Change the Show Selected Series As to Line
Hide the legend
Unfortunately, if the chart is a Bar chart, the Target line will have markers on them
|I am using latest version of Crystal report 184.108.40.2066. I am unable to find the options you said. I don't have Grid Lines property.Could you please help me on this.|
It appears that the version of Crystal Reports that you quoted is the Crystal Reports Viewer and not the actual software used to create and edit the reports.
For you to make the changes of my blog, you will need to have a full version of Crystal Reports installed.