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

Graph: Show Grouping on X-Axis

Status
Not open for further replies.

dky1e

Programmer
May 4, 2002
293
US
Hi,

I'm playing around with Crystal and i've run into a problem and I can't find a solution.

Here's sample data:
Year type value
2002 blue 1
2002 yellow 2
2002 green 1
2003 blue 3
2003 yellow 2
2003 green 2

Now I want to graph it so that the x-axis will show the year and the type for each record and the y axis will store the 'value' column. I can only get to display the Year on the x-axis, but the columns show the correct data, the year is just repeated 3 times for each of the types, it's annoying because there is nothing that identifies the type on the x-axis.

Here's what the x-axis looks like:
. . . . . .
2002 2002 2002 2003 2003 2003

And I want it to show the type also, such as:
. . . . . .
2002 2002 2002 2003 2003 2003
blue yellow green blue yellow green

It seems like there would be a simple solution, but I just can't find it.

Thanks!
 
Ok. I solved it by creating a custom Formula field that just concatenates the Year and Type together. Is there a better way?
 
Just one more question, the year is displayed in the following format: "2,003".

How can i get rid of the comma?
 
Change your formula to something like:

totext(year({table.date}),0,"") + " " + {table.type}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top