Page 1 of 2

SumRunning

Posted: Sat Sep 10, 2011 2:10 pm
by shocraneh
Hi,
I am using the following code
{IIF( SumRunning(DataBand1,DTJornal.Debit-DTJornal.Credit)>'0',d,c)}
but i get this error :object reference not set as instance of object

and code
{SumRunning(GroupHeaderBand1,DTJornal.Debit}
run incorect
Thanks

SumRunning

Posted: Mon Sep 12, 2011 2:03 am
by Alex K.
Hello,

Please try to use the following expression:

Code: Select all

{IIF( SumRunning(DataBand1, DTJornal.Debit - DTJornal.Credit) > 0, d, c)}
or

Code: Select all

{IIF( SumRunning(DataBand1, DTJornal.Debit - DTJornal.Credit) > 0, "d", "c")}
Thank you.

SumRunning

Posted: Mon Sep 12, 2011 6:28 am
by shocraneh
thanks . it have error:
Unhandled exception has occurred in a component in your application
Object refrence not set to an instance of an object.

SumRunning

Posted: Tue Sep 13, 2011 2:41 am
by Ivan
Hello,

Can you please send us a sample report template with data, which reproduces the issue?

Thank you.

SumRunning

Posted: Wed Sep 14, 2011 12:25 pm
by shocraneh
hello

SumRunning

Posted: Thu Sep 15, 2011 7:35 am
by HighAley
Hello.

Please, try to use this expression in Text13:

Code: Select all

{IIF( Totals.Sum(GroupHeader0, Table1.Debit)- Totals.Sum(GroupHeader0,Table1.Credit )>'0',d , c)}
This expression

Code: Select all

{IIF( Table1.Sub =="a",Sum(Table1.Debit ) ,"")}
calculates sum of all Table1.Debit.
Please, try to sum needed values in a variable.

Please, use this expression in Text1:

Code: Select all

{IIF( Sum(Table1.Debit)- Sum(Table1.Credit )>'0',d , c)}
Thank you.

SumRunning

Posted: Thu Sep 15, 2011 11:29 am
by shocraneh
Hello.
Please,see Text16 and Text17:
i want Text16
1)

Code: Select all

{IIF(  SumRunning(GroupHeader0, Table1.Debit)- SumRunning(GroupHeader0,Table1.Credit )>'0',d , c)}
2)

Code: Select all

Abs(SumRunning(GroupHeader0, Table1.Debit)- SumRunning(GroupHeader0,Table1.Credit ))

SumRunning

Posted: Fri Sep 16, 2011 2:41 am
by HighAley
Hello.
shocraneh wrote:Please,see Text16 and Text17:
i want Text16
1)

Code: Select all

{IIF(  SumRunning(GroupHeader0, Table1.Debit)- SumRunning(GroupHeader0,Table1.Credit )>'0',d , c)}
2)

Code: Select all

Abs(SumRunning(GroupHeader0, Table1.Debit)- SumRunning(GroupHeader0,Table1.Credit ))
Please, try to use this code in Text 16:

Code: Select all

{IIF(Totals.Sum(GroupHeader0, Table1.Debit)- Totals.Sum(GroupHeader0,Table1.Credit )>'0',d , c)}
And this one in Text17:

Code: Select all

{SumRunning(GroupHeader0, Abs( Table1.Debit- Table1.Credit ))}
Is it what do you want?

Thank you.

SumRunning

Posted: Fri Sep 16, 2011 9:27 am
by shocraneh
hello
1)Result "Totals.Sum" diffrent from "SumRunning" . i can not used "Totals.Sum". i want sum result with preview record in every group and in new group start from zero
(120, 220, 340 ( not 340 in every line) and new group : 150 and new group: 0)

2)
{SumRunning(GroupHeader0, Abs( Table1.Debit- Table1.Credit ))}
have error!
thanks

SumRunning

Posted: Mon Sep 19, 2011 2:45 am
by HighAley
Hello.
shocraneh wrote: 1)Result "Totals.Sum" diffrent from "SumRunning" . i can not used "Totals.Sum". i want sum result with preview record in every group and in new group start from zero
(120, 220, 340 ( not 340 in every line) and new group : 150 and new group: 0)
In this case try to use variables for summing. See attached report template.
shocraneh wrote:2)
{SumRunning(GroupHeader0, Abs( Table1.Debit- Table1.Credit ))}
have error!
What types are Table1.Debit and Table1.Credit fields in Data Source?

Thank you.