Solved

Access 2007 Pie Chart Labels

Posted on 2010-08-26
12
1,627 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
12 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 250 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

830 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