Jul 8, 2002 #1 pollux0 IS-IT--Management Mar 20, 2002 262 US I am new to coding in cryst. rep. I want to create a formula similar to this SQL statement: total = Sum(debitAmount) where {journalEntry.accountIdNumber} = {account.accountIdNumber}
I am new to coding in cryst. rep. I want to create a formula similar to this SQL statement: total = Sum(debitAmount) where {journalEntry.accountIdNumber} = {account.accountIdNumber}
Jul 8, 2002 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Set your table join to accomplish: {journalEntry.accountIdNumber} = {account.accountIdNumber} Then create a group for: account.accountIdNumber Drop the {debitAmount} field in the detail, right click it and select insert summary and use sum. Now delete the {debitAmount} field. You can also use a Running Total to do this. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com Upvote 0 Downvote
Set your table join to accomplish: {journalEntry.accountIdNumber} = {account.accountIdNumber} Then create a group for: account.accountIdNumber Drop the {debitAmount} field in the detail, right click it and select insert summary and use sum. Now delete the {debitAmount} field. You can also use a Running Total to do this. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com
Jul 9, 2002 #3 Naith Programmer May 14, 2002 2,530 GB If you're unable to join on these two fields, you could still accomplish this by using formulas: //Start// whileprintingrecords; numbervar total; if {journalEntry.accountIdNumber} = {account.accountIdNumber} then total := total + {debitAmount} else total; //End// Naith Upvote 0 Downvote
If you're unable to join on these two fields, you could still accomplish this by using formulas: //Start// whileprintingrecords; numbervar total; if {journalEntry.accountIdNumber} = {account.accountIdNumber} then total := total + {debitAmount} else total; //End// Naith