Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pie Chart

Status
Not open for further replies.

yapafly

MIS
Jun 2, 2008
7
Hi All,
I have do a pie chart using visual studio 2005..
the data of pie chart is retrieve from oracle database using sql query..
but i wonder how to display the pie chart data in percentage..
i not sure is it can set in the sql query or the limitation of pie chart in vs2005..?

i hope someone can help me...
 
set the label to an expression such as

=FieldName.Value/Sum(Fieldname,"DataSetName")

...or do it in the SQL query

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
set the label to an expression such as

=FieldName.Value/Sum(Fieldname,"DataSetName")

...or do it in the SQL query

Rgds, Geoff
but the =FieldName.Value is not a integer
hence i use =count(FieldName.Value),but i cannot use sum(FieldName.Value).

any other suggestion..
 
but the =FieldName.Value is not a integer

so what on earth are you charting then - you must have a numeric field to be charting it...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Sorry to said that xlbo,
I think u forgot that in sql query can make count by grouping the data even-though is not in numeric type.

I already solve my problem with created another set of dataset in visual studio to obtain the sum..

Whatever, Thanks for your concern

Thanks very much
 
make count by grouping the data even-though is not in numeric type

No - I don't forget that you can count on a text field. My point is that field you have created by using a count IS numeric is it not? Once you have a used a count to generate a new field

Query:
Select Blah, Blah2, Count(Blah3) as TheNumericField

Label:
=Fields!TheNumericField.Value / Sum(Fields!TheNumericField.Value, "DataSetName")

That is the field you use as your label....

anyway - if you have a solution, you have a solution but I really don't think there is any need to create a new data set for it...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top