Advice for a chart

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Advice for a chart

Post by Fabio Pagano »

I am new to chart world, so i ask you for help.

I have a datasource with one record for each customer, with the following columns:

Customer name
Customer Type
Total Billed

Say i have three record with the following values:

"Customer1" "Public" "1.000"
"Customer2" "Private" "1.500"
"Customer3" "Public" "1.200"

I have a report that prints these data, and works ok.

At the end of this report i need to show a bar chart, where each bar is a "Customer type" (the second column "Customer Type", x-axis) with its own value (the sum of the third column "Total Billed" based on "Customer type" grouping, y-axis).

With the three records as above, i should have a chart with two bars, the first bar called "Public" with a value of 2.200 and the second bar called "Private" with a total of 1.500.

Any advice for the chart report design?

I cannot change the datasource schema and i cannot manage report events, i can only change the report design.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Advice for a chart

Post by Edward »

Hello, Fabio.

To show this bar chart you need to prepare a data using a "Data from other DataSource" DataSource.

You need to add two columns in the 'Groups' section of that DataSource's wizard:

Customer Type
Total Billed

This new DataSource will return only two necessary records with sum of 'Total Billed' records as a result for each 'Customer Type' value.

This DataSource can be used as a DataSource for the bar chart.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Advice for a chart

Post by Fabio Pagano »

I fear that i cannot do this way. In our software (note that we are a software house that has implemented StimulReport as reporting tool, we are not the final users of the report) we pass a dataset to the StimulReport but, before, we do a clear of the registered DataSources. This is because our users must have no control over the data source, so they cannot change it and cannot add new data sources. The can only design the report with the datasource we provide.

So, if there are not alternatives, i would like to know if, given the above datasource structure, i can obtain a report only with the required chart in it (without the detail of the records).

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Advice for a chart

Post by Fabio Pagano »

Any further help?

Summarizing:

I have a datasource with one record for each customer, with the following columns:

Customer name
Customer Type
Total Billed

Say i have three record with the following values:

"Customer1" "Public" "1.000"
"Customer2" "Private" "1.500"
"Customer3" "Public" "1.200"

I need to obtain a report with a bar chart where each bar is grouping the "Customer type" column, i don't need anymore the records detail as in my first request (actually is impossibile for me to do as Edward suggested). So in this chart, according to the above example, i would have two bars, one for "Public" and one for "Private".

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Advice for a chart

Post by Fabio Pagano »

I have solved removing some limitations that i put in my dll that encapsulated your dlls. So now my final user can create his own datasource from the original datasource and group as he want. It's working now and i'm obtaining the chart i requested for.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Advice for a chart

Post by Edward »

Please let us know if we can assist you any further.

Thank you.
Post Reply