Missing Pie Slice in Pie Chart

A

Alan Z. Scharf

1. I have a report with an MSGraph pie chart based on a query from SQLServer
in an Access ADP file.

2. The first row of data for the pie is missing, and the pie adds up the
remaining data rows to 100% as if the first row isn't in the dataset.

3. The datasheet for the pie chart is

StyleName AssetVal
US Long/Short $1,279,235,962.54
Global Macro $698,732,662.86
Cash & Other $534,771,158.10
Global Equity Long $438,678,247.72
Emerging Markets $192,987,295.78


I think I know what is happening, but I'm not sure why.

Using the above dataset,:

1. If I paste it into the datasheet in Design mode, the pie chart
displays correctly in Design mode.

2. However, if I then Preview the Access report, with the underlying query
as the datasource for the chart, the first data row for 'US Long/Short'
is missing as a pie slice.

3. I can reporduce this problem manually in Design mode if I clear the
datasheet and then paste the five data rows into the datasheet starting
with the very top row, i.e. overwriting the row with the column headings
'StyleName' and 'AssetVal'. In this test, the first row in the datasheet
has the missing
pie slice data, instead of the Column Names. Hence only the last four rows
are used as data for the pie.

4. Conclusion: Somehow, it seems the query is doing the same thing as my
manually creating the problem, i.e. not placing the data in the datasheet
properly, overwriting the column name row.

I checked the query and it works fine and is returning the correct data..

Thanks for any help.

Alan
 
D

Duane Hookom

The only slice that is missing is the one with the "/" in the StyleName.
What happens if you change it?
 
A

Alan Z. Scharf

Duane,

Thanks for your reply.

1. I tried taking out the '/' already. Still same problem.

2. Also, if I reverse sort order, it's still the first data row that's
missing.

3. NOTE: I just confirmed my suspicion of what was happening:

A. I cleared the datasheet in Design mode.
B. I then previewed report and went back to Design mode.
C. Now, datasheet was filled in with actual data from query, and first
data
row was in topmost row where column names should be.
Hence, first data row is omitted from pie because positioned incorrectly
in
datasheet. It has no pie slice number.

Datasheet result from query execution
-----------------------------------------
Global Macro 655371297 PIHF
1 US Long/Short 1166296477 PIHF
2 Event Driven 220072555.1 PIHF
3 US Emerging Growth 484819561.2 PIHF
4 Europe Long/Short 320978994.2 PIHF
5 Global Equity Long 428238743 PIHF
6 Japan Long/Short 287275583.9 PIHF
7 Other 231315482.2 PIHF


4. Is there any way to force the preservation of the column name row so
that
the first data row properly goes into the second physical row of the
datasheet, i.e. where the numbering of the pie slices start?

Thanks very much.

Regards,

Alan
 
A

Alan Z. Scharf

Duane,


1. The report and chart data sources are standard SQL queries. They both
work because the correct data is being returned for the report and its
chart. The problem exists whether I use a SQL string or saved query as the
data source. I've done charts in Access reports for a long time and
haven't had this problem.

2. As indicated before, the problem is that the first data row pulled by
the chart query is overwriting the topmost column name row in the
datasheet, and that the actual pie slice numbering in the datasheet begins
with the second data row from the chart query result set.

Thankis.

Alan


Data Sources
--------------
Report source: SELECT Fundname, FundCode FROM tblFundNames
Chart source: SELECT StyleName, AssetVal, FundCode FROM
tblAllocationByFundStyles
 
D

Duane Hookom

ACG Soft has some tips regarding graphs on reports. I'm not sure how they
relate to ADPs.

What happens if you place an order by on the chart Row Source?
 
A

Alan Z. Scharf

lready tried that.

Whatever I do, the first data row is put in the first column name row and
not in the first pie slice row with number 1.

I think I solved it by adding extra dummy rows to table which will get
sorted to top, fill in the column name row, and push the first real data row
down to the pie slice 1 row where it belongs.

Thanks for your help.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top