How is sum in Row wise ?

Stimulsoft Reports.NET discussion
Post Reply
MARIMUTHU K
Posts: 101
Joined: Wed Jul 26, 2006 8:03 am
Location: CHENNAI-TN, INDIA

How is sum in Row wise ?

Post by MARIMUTHU K »

Hi Edward and stimul team,

We r using Stimulsoft 2008.1.146.0 in 3-Mar patch file.
Now we want sum row wise, For example

No. Day Amount Day/Amount
1. Mon 4.80
2. Mon 5.00
3. Mon 3.00 12.80
4. Tue 1.00
5. Tue 2.00 3.00
4. Wed 7.89 7.89
5. Thu 2.39 2.39
------------
Total xxx.xx


We did Day wise order and Sum Amount, but
How do Da/Amount in row wise depended on Day wise?

We tried SumD but is not fullfillment.
Please provide way of Row sum in particular column.
Its urgent Help.



Thanks in Advance,


Marimuthu K
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

How is sum in Row wise ?

Post by EDV Gradl »

I think you need a group header and footer.

In group header you define Condition (Day) and set height to 0
then you need a variable mysum
in afterprintevent of Group header you set mysum = 0
in rendering event of databand you set mysum += Amount
and i the footer you show your variable mysum

I hope this does the trick.

Marco
MARIMUTHU K
Posts: 101
Joined: Wed Jul 26, 2006 8:03 am
Location: CHENNAI-TN, INDIA

How is sum in Row wise ?

Post by MARIMUTHU K »

Thanks ,its working

But,


We are rendering one mrt and display total column (Now This total already calculated proc ) . So it came duplicate records, we are set property Processing Duplicate is Hide then first row column displayed . But We want that total column display is last row.

For Example We want following Structure. (Correct Format)

No. Day Amount Total
1. Mon 4.80
2. Mon 5.00
3. Mon 3.00 12.80
4. Tue 1.00
5. Tue 2.00 3.00
4. Wed 7.89 7.89
------------
Grand Total xxx.xx


But Now it came structure ( Format)


No. Day Amount Total
1. Mon 4.80 12.80
2. Mon 5.00 12.80
3. Mon 3.00 12.80
4. Tue 1.00 3.00
5. Tue 2.00 3.00
4. Wed 7.89 7.89
------------
Grand Total xxx.xx

Color indicate duplicate Total.


Please provide solution for Hide and display only Last Row




Thanks in Aedvance
Marimuthu K
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How is sum in Row wise ?

Post by Edward »

The solution for the issue requires a lot of script. There is no a simple way. If it is ok, then please let us know and we'll provide you with solution.

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

How is sum in Row wise ?

Post by Edward »

Please open this report in the Demo.exe application in the next prerelease build. We are planing to release it on March,21.

Here is the code of the BeforePrintEvent of the DataBand:

Code: Select all

if ( PreviousIsNull(Products,"CategoryID")||
    ((int)(Previous(Products,"CategoryID")) != Products.CategoryID)||
    ((int)(Previous(Products,"SupplierID")) != Products.SupplierID)
   )
{
  MySum = 0;
}
MySum += Products.UnitsInStock;
TextWithMySum.Enabled = (NextIsNull(Products,"CategoryID")||
((int)(Next(Products,"CategoryID"))!= Products.CategoryID)||
((int)(Next(Products,"SupplierID"))!= Products.SupplierID)
);

Please declare a variable MySum in the Dictionary of the report.

Image

Here is a result of rendering of that template:

Image

If you have any questions please feel free to ask.

Thank you.
Attachments
41.CheckNextRow.mrt
(19.74 KiB) Downloaded 283 times
Post Reply