[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Access 2007 Pie Chart Labels

Posted on 2010-08-26
12
Medium Priority
?
1,726 Views
Last Modified: 2013-11-28
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
Comment
Question by:ccbailey
  • 6
  • 5
11 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33532567
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
 

Author Comment

by:ccbailey
ID: 33532937
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
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 750 total points
ID: 33533232
<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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:ccbailey
ID: 33533453
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
 

Author Comment

by:ccbailey
ID: 33533781
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
 

Accepted Solution

by:
ccbailey earned 0 total points
ID: 33534838
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
 

Author Comment

by:ccbailey
ID: 33534940
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
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33536332
Please click the "Request Attention" button and explain what you want to do with regard to closing this question.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33536371
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
 

Author Comment

by:ccbailey
ID: 33536431
OK, I requested attention and explained the deal.  Thanks for the help.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33536687
OK
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question