Too much Pie

Privateer

Registered User.
Local time
Yesterday, 20:24
Joined
Aug 16, 2011
Messages
193
I created a pie chart in a form and did all the formatting there. Then I added it to a report and slid that report onto the main report. This whole process has worked fine with other sub reports, but his pie chart is doing something interesting. It there are four slices in the pie, I am getting four pies, each with the four slices; ten slices, ten pies. Now as good as that sounds I only want one pie. The source table lists the information four times and I am linked by the Master/Child field. I suspect that because the data is in columns and the master report with one portfolio ID is being linked to four records that that is causing the four pies. How do I keep the four slices but get rid of three pies?

The source data for the pie is like this:
PortfolioID, State, AssetCount
1 CA 65
1 NV 5
1 HI 1
1 TX 6

The row source for the pie is: (The wizard did this and it seemed to work)
SELECT [State],Sum([AssetCount]) AS SumOfAssetCount FROM [tblReport12Sub4] GROUP BY [State];

There is no criteria here because the Master/Child link should handle that. Anyway, that is the situation. Any help would be greatly appreciated.
 
Never mind, I figured it out. The main report has 21 records and the pie has 135. I was using the pie table as the record source for the form, meaning 135 charts. When I changed the record source for the sub form/report to the main report table, I got 21 charts. So the form uses the master table for its source, but the chart pulls the records from where ever you specify in the charts row source. And by linking then on a common field, the chart uses that link as a criteria for its query. It makes sense now but I was missing it before. Thanks everyone for looking.
 

Users who are viewing this thread

Back
Top Bottom