Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subdivided Axis Labels in Chart Post Reply Post New Topic
Author Message
JennyB
Newbie
Newbie


Joined: 26 Dec 2012
Online Status: Offline
Posts: 24
Quote JennyB Replybullet Topic: Subdivided Axis Labels in Chart
     Posted: 24 Apr 2013 at 1:34am
Hi,

I have a crosstab with 2 row labels, Locations and Courses, something like this:
                                             Total
Location1         Course1          10
                        Course2          15
Location2         Course1           5
                        Course3           9
...

I want to create a horizontal bar graph which has 2 axis labels, the Location, and then within it the Courses, kind of like this just so I'm being clear:

Location1       Course1      XXXXXXXXXX
                      Course2      XXXXXXXXXXXXXXX

Location2       Course1      XXXXX
                      Course3      XXXXXXXXX

I can't seem to find a way to do this, when I try I can get the chart to break down the data into Location and Course, but it only shows the Location label on the axis. I created the crosstab to use thinking it might give me more chart options than the basic ones but I can't find anything. All I can think of is creating a function with {Location}&", "&{Course} and using that field instead for the chart axis but I thought I'd ask if there was a better way of doing it I hadn't thought of.

Thank you as always! :)

Jenny

IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 24 Apr 2013 at 1:56am
Hi

I could do it with crosstab, I don't know why you are not able to creat it.

I did the following :

Created a crosstab by placing Location and Cource on Rows and placed Total in summarized.

Right click on crosstab and insert chart and went into chart expert and changed to Stacked bar chart and selected Horizontal radio button.

That's all.. it looks good, If you want this report to be sent on your ID send your email through Private Messennger.
Thanks,
Sastry
IP IP Logged
JennyB
Newbie
Newbie


Joined: 26 Dec 2012
Online Status: Offline
Posts: 24
Quote JennyB Replybullet Posted: 24 Apr 2013 at 2:11am
Hi Sastry,

Thanks for your help, I've started again and done exactly as you have above but I now get:

Location1 XXXXXXXXXXOOOOOOOOOOOOOOO
Location2 XXXXXBBBBBBBBB

Legend:
X Course1
O Course2
B Course3

I want it to show me both the Location and Course labels on the Y axis, is that what it looks like to you? I've got it to kind of work by concatenating the Locations and Course fields and using the function on the Y axis and it looks ok and at least has all the info there but I wanted it to be like a cross tab with the location shown once then the courses within it. :)

Thanks!

Jenny
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 24 Apr 2013 at 2:59am
Hi Jenny,

Can you check your crosstab row fields order:

It should be

Location
Course

Thanks,
Sastry
IP IP Logged
JennyB
Newbie
Newbie


Joined: 26 Dec 2012
Online Status: Offline
Posts: 24
Quote JennyB Replybullet Posted: 25 Apr 2013 at 12:41am
Hi,

That's right, that's how they are and how the crosstab displays, and in the Chart Expert the Crosstab is selected for the data source and it has 'On Change of' set to Location, and 'Subdivided By' set to Course. It does divide it up that way, but instead of being able to have Location and Course labels on the Y axis, it has Location labels only and the Course labels are in a legend.

I've got my workaround set up, I've created a concatenated Location and Course field and used that for the axis but it makes it a long field and quite untidy looking, but its working at least! :)

Thanks,

Jenny
IP IP Logged
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