Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Adding a Target Line to Bar Chart programmatically Post Reply Post New Topic
Author Message
rohan2289
Newbie
Newbie


Joined: 01 Apr 2009
Location: United States
Online Status: Offline
Posts: 1
Quote rohan2289 Replybullet Topic: Adding a Target Line to Bar Chart programmatically
    Posted: 01 Apr 2009 at 6:50am
hi guys, i would really appreciate if you could solve my problem, i am new to Crystal Reports, i need to do the following on an aspx page, i am using CR10.2

i need to add a target line on a bar chart, e.g.
 
I have (Y)years and (X)Examscores, I need to put a line (target line) on the Exam Scores.
 
 
   (X)Score|
               |
               | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   (this is the targtet line i need to have)
               |
               |
               |__________________________
                2001          2002           2003
 
 
now this target line should move up or down line on click on a button, so i need to add it to the bar chart programmatically after the chart loads.
 
I really need to get this done this week or else I would be in trouble.
 
I appreciate your help and time.
 
Thanks
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 19 May 2009 at 9:55pm
Hi,
 
Right Click  on the report -> Chart options -> Grid -> Grids Tab
 in this tab there is an option Draw custom line at.
I think you can use this option for target line, But I have no idea how to set this programatically.
 
Jyothi
IP IP Logged
Dan3D
Newbie
Newbie


Joined: 25 Feb 2007
Location: United States
Online Status: Offline
Posts: 33
Quote Dan3D Replybullet Posted: 20 May 2009 at 9:20pm
The "free" way to do this is to create a formula that returns the value of your target line and then add it to the "Show Data" section in the chart expert so it gets plotted as a series of data. If its a bar or area chart, then the series will initially show up as bar/area, but you can then click on it and do "series options..." and force it to become a line.
 
The non-free way to do this would be to investigate our CRChart add-in, which has extensive support for programmatically set user-lines. Including options to put labels, values on them, etc...
 
-Dan
 
DISCLAIMER: I work for the company, threedgraphics.com, that makes this product. This product costs money.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.014 seconds.