How to sum another Group's Detail

Stimulsoft Reports.NET discussion
RickyHuang
Posts: 68
Joined: Tue Feb 09, 2010 3:16 am
Location: Taiwan

How to sum another Group's Detail

Post by RickyHuang »

hi

when i use the expression :Sum(GroupA,PRT150.MyAMT)
in GroupB,
but it is still Summary GroupB's MyAMT

How can i summary GroupA's detail in GroupB?

ex:
GroupA
---HeaderbandGroupB
------DetailA---Dataset.Amount / Sum(GroupA,Detaset.Amount)
------DetailB---Dataset.Amount / Sum(GroupA,Detaset.Amount)
---FootbandGroup
FootbandGroup

Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to sum another Group's Detail

Post by Jan »

Hello,

Try to use following expression:

Code: Select all

Totals.Sum(GroupA,PRT150.MyAMT)
Thank you.
RickyHuang
Posts: 68
Joined: Tue Feb 09, 2010 3:16 am
Location: Taiwan

How to sum another Group's Detail

Post by RickyHuang »

..^_^..

thanks a lot
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

How to sum another Group's Detail

Post by Andrew »

Have a nice day!!!
RickyHuang
Posts: 68
Joined: Tue Feb 09, 2010 3:16 am
Location: Taiwan

How to sum another Group's Detail

Post by RickyHuang »

i got a problem.....

『Totals.Sum(GroupA,PRT150.MyAMT) 』 can summary GroupA

and

how can i summany all PRT150.MyAMT in GroupB ?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to sum another Group's Detail

Post by Jan »

Hello,

Try to call:

Code: Select all

Totals.Sum(GroupB,PRT150.MyAMT)
Thank you.
RickyHuang
Posts: 68
Joined: Tue Feb 09, 2010 3:16 am
Location: Taiwan

How to sum another Group's Detail

Post by RickyHuang »

Jan wrote:Hello,

Try to call:

Code: Select all

Totals.Sum(GroupB,PRT150.MyAMT)
Thank you.
Thanks for your help

but,is it can summary all the report's PRT150.MyAMT ?

GroupA:Totals.Sum(GroupA,PRT150.MyAMT)

GroupB:Totals.Sum(GroupB,PRT150.MyAMT)

all PRT150.MyAMT:????
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to sum another Group's Detail

Post by Alex K. »

Hello,

Try to call:

Code: Select all

Totals.Sum(PRT150, PRT150.MyAMT)
Thank you.
RickyHuang
Posts: 68
Joined: Tue Feb 09, 2010 3:16 am
Location: Taiwan

How to sum another Group's Detail

Post by RickyHuang »

perfect...

thanks for your help..

-------------------------------------------------------
Is this error a bug??

I use the expression in ReportFootBand

{IIF(Sum(PRT150.PreAMT) != 0 ,Sum(PRT150.CurAMT) / Sum(PRT150.PreAMT),0))}

I got an error like "divide zero" (My language is Chinese,I dont know how to translate),

and , i use customer function to test this expression and show the message,i put the customer function:

{IIF(Sum(PRT150.PreAMT) != 0 ,MyFunction.ShowMessage(Sum(PRT150.PreAMT)),MyFunction.ShowMessage(Sum(PRT150.PreAMT)))}

the message is show 2 times,and his contents is 0,is it mean it run true and false ?

but if without Sum,it is work perfact:

{IIF(PRT150.PreAMT != 0 ,Sum(PRT150.CurAMT) / Sum(PRT150.PreAMT),0))}

and use customer function to test it ,the message is show 1 time。
-----------------------------------------

thanks......




Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

How to sum another Group's Detail

Post by Jan »

Hello,
RickyHuang wrote:perfect...

thanks for your help..
Try to use following expression:

Code: Select all

{IIF(Sum(PRT150.PreAMT) != 0 ,Div(Sum(PRT150.CurAMT) , Sum(PRT150.PreAMT)),0))}
Thank you.
Post Reply