SumRunning

Stimulsoft Ultimate discussion
shocraneh
Posts: 7
Joined: Thu Sep 08, 2011 10:47 am

SumRunning

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

SumRunning

Post 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.
shocraneh
Posts: 7
Joined: Thu Sep 08, 2011 10:47 am

SumRunning

Post 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.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

SumRunning

Post by Ivan »

Hello,

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

Thank you.
shocraneh
Posts: 7
Joined: Thu Sep 08, 2011 10:47 am

SumRunning

Post by shocraneh »

hello
Attachments
1315.SumRunning.rar
(261.72 KiB) Downloaded 342 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

SumRunning

Post 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.
shocraneh
Posts: 7
Joined: Thu Sep 08, 2011 10:47 am

SumRunning

Post 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 ))
Attachments
1317.SumRunning.rar
(265.64 KiB) Downloaded 287 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

SumRunning

Post 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.
shocraneh
Posts: 7
Joined: Thu Sep 08, 2011 10:47 am

SumRunning

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

SumRunning

Post 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.
Attachments
1322.GroupSumRunning.mrt
(31.86 KiB) Downloaded 463 times
Post Reply