This is a migrated thread and some comments may be shown as answers.

Group Sums / Aggregates part duex

5 Answers 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 27 Jun 2011, 05:08 PM
Hi All,

I have the general group aggregate processes working so I understand the concept.  What I need on the report, however, is a bit more complicated.

I have the following logical grouping:
Labels
    Field.PropertyA
        Field.PropertyB

I aggregate PropertyB with values in a textbox in the group as: = Sum(Fields.quantity* Fields.convPounds)
This produces two logical group per PropertyA as there are two possible values for PropertyB.

At the footer of the report, I'd like to present the total aggregates of the two PropertyB groups.

The sample provided gives us generic grand total without any differentiation which is something I'd need to carry to the end.  So in the report footer I'd have something like:

    "Net total PropertyB.Type1" = SUM()
    "Net total PropertyB.Type2" = SUM()

Help is appreciated.

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Jun 2011, 09:43 PM
Hi Mark,

Have you tried using the Data Scope Related Functions with the specific groups as first argument and the aggregate as second?

All the best,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 30 Jun 2011, 09:49 PM
Hi Steve,

Thanks very much for the direction this will certainly sort it.

Mark
0
Mark
Top achievements
Rank 1
answered on 01 Jul 2011, 11:27 PM
Hi Steve,

I guess I spoke too soon.  I spent some time reviewing the documentation and testing the logic, and if I understand it correctly basically I can target a group, but I can't differentiate the group.  As you see from my description, I need to aggregate each "PropertyB".  I've tried unsuccessfully using logic like exec(Field.PropertyB='apple', sum(field.quantity * field.pounds).

I also had a look at the User Aggregate Functions.  I was wondering if a sample was available that utilizes this approach.  I looked at the included and didn't see it in action.  Perhaps this might provide what I need.

If you have a small sample of it that would be terrific, or any other advice.

Thanks as always.
Mark
0
Steve
Telerik team
answered on 06 Jul 2011, 01:52 PM
Hi Mark,

I guess using expressions like this is what you are after:

"Net total PropertyB.Type1" = Sum(IIf(Fields.PropertyB = "Type1", Fields.quantity* Fields.convPounds, 0))
"Net total PropertyB.Type2" = Sum(IIf(Fields.PropertyB = "Type2", Fields.quantity* Fields.convPounds, 0))

Regards,
Steve
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Mark
Top achievements
Rank 1
answered on 06 Jul 2011, 01:54 PM
Hi Steve,

Thanks as always.  This looks like it will suit me perfectly.
I appreciate you continued support very much.

Mark
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Steve
Telerik team
Mark
Top achievements
Rank 1
Share this question
or