[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1710
  • Last Modified:

Access 2007 Pie Chart Labels

I am trying to create a pie chart in Microsoft Access using a simple crosstab query.  I can get the pie chart to display correctly, except for the labels - all I get for the labels is "Slice 1", "Slice 2", etc.  See attached file - I've included the data from the query as well as a screen shot of the chart with the labels from the report.    

Basically, I'm wanting the labels to pull from the "Status" field, and the values from the "Total Of Total_Facilities" field.
Sample-Qry.xlsx
0
ccbailey
Asked:
ccbailey
  • 6
  • 5
2 Solutions
 
Jeffrey CoachmanCommented:
If you use the data you posted, then simply edit the chart to display the:
Percentage
...and
CategoryName

(You did not say how you tried to create your chart, so I am unsure why you got the results you did...)

Screenshot and sample file attached...

;-)

JeffCoachman
Database20.mdb
untitled.JPG
0
 
ccbaileyAuthor Commented:
I created it using the chart wizard within MS Access, but then I edited the Row Source query to show the values I wanted.  For example, the "Status" field has to be the second field in the query (opposite from how I've shown it in the file), and I've added a "Null" field at the beginning.  My total SQL string is:
SELECT Null AS Expr, qry_Project_Status_Totals_Crosstab.[Total Of Total_Facilities], qry_Project_Status_Totals_Crosstab.Status
FROM qry_Project_Status_Totals_Crosstab;
The strange thing is, I've selected the Percentage and CategoryName as youve suggested (see attachment), but instead of grabbing the "Status" field as the category name, it's assigning "Slice 1", "Slice 2", etc.  I can't figure out how to get it to use the field for the category names.  Is there a better way to create the chart?

Screenshot.jpg
0
 
Jeffrey CoachmanCommented:
<but then I edited the Row Source query to show the values I wanted. >
Why?
If the values are in the data, there is no need.

I simply used the data you posted (you can still use your Crosstab query for this if the results are the same.)

Then I set the the "Total Of Total_Facilities" in the Data area, and then I set "Status" as the Series.

Then as I stated, I simply edited the chart to display the:
Percentage
...and
CategoryName.

Now keep in min that if you based the Chart on the raw data, it would have created a summary query for you.
This is sometimes easier as the chart wizard "usually" makes good assumptions about your chart.

;-)

JeffCoachman
untitled.JPG
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ccbaileyAuthor Commented:
I edited the data because my chart was blank, but let me try it like you have it - I'll get right back to you.
0
 
ccbaileyAuthor Commented:
OK, I narrowed down my problem - I tried recreating the chart exactly the way you showed, and it came up blank again.  So then I opened a new, blank report and tried again - it worked like a charm!  The deal is, I have data that displays above the chart, and I want the chart to show in the report footer (below the sums - see attachment).  Is there a way to make it display correctly in the footer, or should I just create it in a subreport and place the subreport in the footer?
Thanks for the help!

Exhibit-B-5.pdf
0
 
ccbaileyAuthor Commented:
OK, I got it - I did put the chart on a blank report, inserting as a subreport on the final product, and that cleared up my label issues.  Thanks for the help - it was helpful to know what it "should" do that prompted me that the problem didn't lie with the chart itself, rather with the location of the chart.  Who'd have thunk!  Thanks!
0
 
ccbaileyAuthor Commented:
Not sure what I did - I was not intending to close the question - I meant to give partial credit (and all points) to the second expert comment above, and also mark my final answer as the solution.  Sorry for the confusion.
0
 
Jeffrey CoachmanCommented:
Please click the "Request Attention" button and explain what you want to do with regard to closing this question.
0
 
Jeffrey CoachmanCommented:
Creating the exact same chart in the Report Footer worked fine for me...

But as long as you have it working, then it's all good...
;-)

Jeff
0
 
ccbaileyAuthor Commented:
OK, I requested attention and explained the deal.  Thanks for the help.
0
 
Jeffrey CoachmanCommented:
OK
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now