Summary Chart in Group Footer

Stimulsoft Reports.NET discussion
Post Reply
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Summary Chart in Group Footer

Post by Ink »

Hi,

I have a simple report which consists

GroupHeaderBand
DataBand
GroupFooterBand

There are several groups

I have several values in the DataBand which I sum in the GroupFooter.
I now want a chart in the group footer which displays the summed value



I add to my chart using 'List of Arguments' (Value1;Value2;Value3 and so on)
Then I use 'List of Values' ({Sum(MyDataSource.Field1)};{Sum(MyDataSource.Field2)};{Sum(MyDataSource.Field3)} and so on)

But this generates an error

1. Error! The error of compilation
The error of compilation is found in the 'report' report:
The name 'Sum' does not exist in the current context.

Can you please explain how to create a chart based on the summed values in the footer of each group?

Regards,

Jon.




HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Summary Chart in Group Footer

Post by HighAley »

Hello, Jon.
Ink wrote:I have a simple report which consists

GroupHeaderBand
DataBand
GroupFooterBand

There are several groups

I have several values in the DataBand which I sum in the GroupFooter.
I now want a chart in the group footer which displays the summed value

I add to my chart using 'List of Arguments' (Value1;Value2;Value3 and so on)
Then I use 'List of Values' ({Sum(MyDataSource.Field1)};{Sum(MyDataSource.Field2)};{Sum(MyDataSource.Field3)} and so on)

But this generates an error

1. Error! The error of compilation
The error of compilation is found in the 'report' report:
The name 'Sum' does not exist in the current context.

Can you please explain how to create a chart based on the summed values in the footer of each group?
Unfortunately, 'List of Values' property doesn't support functions. There are two ways to solve your problem.

1. You should create Variables and set its values in the Before Print event of the Group Footer. (see Report1.mrt).

2. You should rebuild your report template. Create Data Source on other Data Source with grouping and sums then create a relation with this Data Source and make master-detailed report. (see Report2.mrt)

Thank you.
Attachments
1511.Report2.mrt
(32.42 KiB) Downloaded 539 times
1510.Report1.mrt
(31.57 KiB) Downloaded 626 times
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Summary Chart in Group Footer

Post by Ink »

Thanks Aleksey,

I found the solution in this thread

http://forum.stimulsoft.com/Default.aspx?g=posts&t=4269

It works perfectly for me, I just have to set each variable back to zero in the GroupHeader BeforePrintEvent.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Summary Chart in Group Footer

Post by HighAley »

Hello.

Great!

Let us know if you need any additional help.

Have a happy weekend!
Post Reply