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

Bar chart newbie question 1

Status
Not open for further replies.

dr2706

Programmer
Feb 23, 2011
3
US
I am trying to create a Bar Chart. I have all the data the way I want it in SQL. The 2 columns are Group and ElapsedTime (Group and Elapsed Time being rendered as a varchar field in SQL).

I simply want each group on the x axis and the Elapsed Time on the y axis. I choose Insert Chart, then Bar Chart then the Advanced Data tab. I select For Each Record (because I have already done the grouping and reformatting in SQL.

The OK button is greyed out. I looked in Crystal Help and it said

I then looked at Crystal Help and it says "Choose "For each record" to see values for each record in your report. Note: For this option, you don't choose a field for the area below the list."

So what can I do to enable the OK button?

Thanks,

Dick
 
What happens if you use "Group" as your "on change of" field?

-LB
 
Hi LB,

It gives me one option

Count of Elapsed Time

I think the problem is that Elapsed Time is a string that I created in SQL by figuring out the day, hours and minutes of the datediif in minutes between my start date and getdate() and rendering that result as dd:hh:mm. That is the way the user would like to see it on the graph. Last night I realized that Crystal might not be very good at figuring out that "10:02:05" (10 days, 2 hours and 5 minutes) is greater than "07:15:22" (7 days, 15 hours and 22 minutes).

I was thinking that I certainly could pass the Elapsed Minutes as an integer along with my calculated string Elapsed Time and that Crystal would probably have an easier time rendering this on a bar chart. However the user would have a hard time figuring out how much time, say, 10,384 minutes, is. Is there a way I can have the Elapsed Minutes be used for the actual graphing but have the
Elapsed Time appear along the Y axis?

Or now that you know what I think are most of the details, is there a better way?

Thanks,

Dick
 
You MUST use a number field (minutes) for the show value area. There is not currently a way to convert these values for display purposes into a string (as far as I know).

You could perhaps supplement the chart with a manually created legend that translates the minutes into the string display. You could use a subreport for this purpose.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top