Page 1 of 2

How to sum another Group's Detail

Posted: Sun Aug 01, 2010 8:28 pm
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


How to sum another Group's Detail

Posted: Mon Aug 02, 2010 4:19 am
by Jan
Hello,

Try to use following expression:

Code: Select all

Totals.Sum(GroupA,PRT150.MyAMT)
Thank you.

How to sum another Group's Detail

Posted: Mon Aug 02, 2010 5:26 am
by RickyHuang
..^_^..

thanks a lot

How to sum another Group's Detail

Posted: Mon Aug 02, 2010 6:43 am
by Andrew
Have a nice day!!!

How to sum another Group's Detail

Posted: Tue Aug 03, 2010 3:57 am
by RickyHuang
i got a problem.....

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

and

how can i summany all PRT150.MyAMT in GroupB ?

How to sum another Group's Detail

Posted: Tue Aug 03, 2010 7:14 am
by Jan
Hello,

Try to call:

Code: Select all

Totals.Sum(GroupB,PRT150.MyAMT)
Thank you.

How to sum another Group's Detail

Posted: Tue Aug 03, 2010 7:38 pm
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:????

How to sum another Group's Detail

Posted: Wed Aug 04, 2010 1:57 am
by Alex K.
Hello,

Try to call:

Code: Select all

Totals.Sum(PRT150, PRT150.MyAMT)
Thank you.

How to sum another Group's Detail

Posted: Wed Aug 04, 2010 3:13 am
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......





How to sum another Group's Detail

Posted: Wed Aug 04, 2010 11:05 am
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.