How to merge objects by property

Stimulsoft Reports.NET discussion
Post Reply
l.rohrmann
Posts: 12
Joined: Wed Jan 15, 2014 11:48 am

How to merge objects by property

Post by l.rohrmann »

Hi, I've got a set of objects, called Position. Each Position has properties, for example: UnitPrice, Amount and TaxRate. I'd like to get a list, where (specific properties of) all Positions with the same TaxRate get sumarized (UnitPrice*Amount). How is this possible?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to merge objects by property

Post by HighAley »

Hello.

Sorry, but we don't understand what problem do you have with creating this report.
Could you describe your issue more detailed?

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to merge objects by property

Post by Alex K. »

Hello,

Can you please send us a sample with test data for analysis.
Also please see the samples with business objects in our Demo.

Thank you.
l.rohrmann
Posts: 12
Joined: Wed Jan 15, 2014 11:48 am

Re: How to merge objects by property

Post by l.rohrmann »

At the moment, i've a table like this:

the first Column = Positions.TaxRate
the second Column = Positions.UnitPrice*Positions.Amount
the third Column = Positions.UnitPrice*Positions.Amount*(Positions.TaxRate/100)

Code: Select all

0%  Tax | 150 $ |  0 $ 
0%  Tax |  20 $ |  0 $ 
5%  Tax | 100 $ |  5 $
10% Tax | 250 $ | 25 $
By Processing duplicates only in the column row I get this:

Code: Select all

0%  Tax | 150 $ |  0 $ 
        |  20 $ |  0 $ 
5%  Tax | 100 $ |  5 $
10% Tax | 250 $ | 25 $
But what i want is this:

Code: Select all

0%  Tax | 170 $ |  0 $ 
5%  Tax | 100 $ |  5 $
10% Tax | 250 $ | 25 $
Also I tried to set the second and third column on "merge based on tag", the result was this:

Code: Select all

0%  Tax | 150 $ |  0 $ 
        |       |      
5%  Tax |       |     
10% Tax |       |     
Inside the attached File, "Datenband1; Bussinesobject: Positions" the last 3 columns are the relevant ones.
Attachments
ServiceReportStandardSteuer.mrt
(146.75 KiB) Downloaded 337 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to merge objects by property

Post by HighAley »

Hello

You should use Group Header Band instead of the Processing Duplicates property.
Please, look at the attached report template.
report.zip
(2.05 KiB) Downloaded 234 times
Thank you.
Post Reply