Sum variable Value on Form

I declare a variable, who store data form two table. I want to sum the values of the variable on form of ax 2012.

for exp:

invvalue =( custinvoicejour.invoiceamt ) - (Cslchagers.value) ;

now on forms value come in 4 to 5 line,

I want to sum the values(invvalue ) of lines on form.

any kind of help is appreciated…

Get data source’s queryRun().query(), add the SUM function, create a new QueryRun instance and execute it.

Thanx Martin .

It works…

Good! Please mark the reply as the verified solution.