|
-
Sep 21st, 2010, 10:30 AM
#1
Thread Starter
Addicted Member
Using a parameter in a pie chart - help please ;-)
My pie chart displays data from a dataset properly right now. What it displays is a sum of materials for a day, grouped by material name.
For example:
LTV - 5000 pounds - 1/1/2010
LTV - 4000 pounds - 1/1/2010
HAT - 2000 pounds - 1/1/2010
HAT - 2200 pounds - 1/1/2010
It sums by material. So in essence I have 9000 LTV and 4200 HAT. The piece that I am missing that I need to add is the "empty space" available. The empty space is simply the Capacity minus the totals above. So if the total capacity is 15,000, I need to take 15,000-13,200(totals of LTV and HAT above) and add 1800 "empty space" to the pie chart.
As I said before, the pie chart works fine displaying the sum of the materials. I have added a parameter to the report with static capacity numbers. How would I subtract the totals of LTV and HAT from the Parameter and display that number on the pie chart? This was all done with the designer as well so far.
Thanks!
-
Sep 21st, 2010, 02:25 PM
#2
Re: Using a parameter in a pie chart - help please ;-)
How are you generating the DataSet? Where are you pulling the data from?
Can you show the code that you are using? You may well be able to add an additional row to the DataTable in the DataSet, so that you can add the "empty space".
Gary
-
Sep 21st, 2010, 03:30 PM
#3
Thread Starter
Addicted Member
Re: Using a parameter in a pie chart - help please ;-)
The data is coming from SQL Server. I have done everything through the designer. No custom code has been created at all. I added a new dataset through the report data window. I then dragged the appropriate fields from the dataset to the pie chart to display what I needed(except for the "empty" data)
-
Sep 22nd, 2010, 01:56 AM
#4
Re: Using a parameter in a pie chart - help please ;-)
Ah, so, here lies one of the problems of using the built in wizards. You are now in a situation where you need to extend the DataSet/DataTable that is getting created for you. If you had used raw ADO.Net code to create the DataSet/DataTable, you would easily be able to extend the code that you have created to add another row into the table.
At this point, the only things that I can suggest would be the following...
1) Alter the SQL Query that is being used to try and figure out the total amount, and the "empty space" and return an extra row.
2) Write the ADO.Net Code required to query the database manually, and construct your own DataSet/DataTable which you would then have full control over.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|