Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass calculated subtotals within a sub grp to the outer group 1

Status
Not open for further replies.

porsche2k7

Programmer
Aug 29, 2007
35
US
Hi All,

I am calculating the difference between two dates within a sub group {Command.TASK_NOTES_ID} using the following formula.

DateDiff ("d",Maximum ({Command.ASSIGN_DATETIME}, {Command.TASK_NOTES_ID}) ,Maximum ({@LastUpdateDateTime}, {Command.TASK_NOTES_ID}) )+1

I want to sum of these values for the outer most grouping {Command.TASK_OWNER}. Can anyone let me know how can I obtain that.

Thanks in Advance.

 
You can use a variable for this. Create three formulas:

//{@reset} to be placed in the task owner group header:
whileprintingrecords;
numbervar diff;
if not inrepeatedgroupheader then
diff := 0;

//{@accum} to be placed in a task notes ID group header or footer:
whileprintingrecords;
numbervar diff := diff + {@yourformula};

//{@display} to be placed in the task owner group footer:
whileprintingrecords;
numbervar diff;

-LB
 
Thanks LBass. Am using something similar.

RunningTotal formula in TaskNotesID group footer:
WhilePrintingRecords;
NumberVar Amount;
Amount := Amount + {@yourformula};

RunningTotalReset formula in TaskOwner group header:
WhilePrintingRecords;
NumberVar Amount := 0;

RunningTotalDisplay formula in TaskOwner group footer:
WhilePrintingRecords;
NumberVar Amount;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top