Question : Totaling with Crystal Reports

Answer : Totaling with Crystal Reports

Try this ideaIn the report header add a formula to declare the variablesWhilePrintingRecords;Global NumberVar LaborTotal;Global NumberVar MaterialTotal;Global NumberVar Class3Total;Global NumberVar Class4Total;Global NumberVar Class5Total;Global NumberVar Class6Total;Global NumberVar Class7Total;Global NumberVar Class8Total;Global NumberVar Class9Total;''In the group header (group 2 )WhilePrintingRecords;Global NumberVar LaborTotal;Global NumberVar MaterialTotal;Global NumberVar Class3Total;Global NumberVar Class4Total;Global NumberVar Class5Total;Global NumberVar Class6Total;Global NumberVar Class7Total;Global NumberVar Class8Total;Global NumberVar Class9Total;LaborTotal := 0;MaterialTotal := 0;Class3Total := 0;Class4Total := 0;Class5Total := 0;Class6Total := 0;Class7Total := 0;Class8Total := 0;Class9Total := 0;''In the detail sectionWhilePrintingRecords;Global NumberVar LaborTotal;Global NumberVar MaterialTotal;Global NumberVar Class3Total;Global NumberVar Class4Total;Global NumberVar Class5Total;Global NumberVar Class6Total;Global NumberVar Class7Total;Global NumberVar Class8Total;Global NumberVar Class9Total;If Left({my-table.Sales-acct},4) = "4500" then    LaborTotal := LaborTotal + (qty * price)Else If Left({my-table.Sales-acct},4) = "4505" then    MaterialTotal := MaterialTotal + (qty * price)Else If Left({my-table.Sales-acct},4) = "NextClass" then    Class3Total := Class3Total + (qty * price)Else  etc for each classTo display then in the group footer (1 formula for each total)WhilePrintingRecords;Global NumberVar LaborTotal;LaborTotalmlmcc
 Random Solutions