Hi again Joshua
If you are referring to the Sample Detailed Workorder with Grand Total for example the field xrNetTaxA field in the ReportFooter1 band, if you expand the Scripts property for this field, you will see that it has a OnBeforePrint script of
private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrNetTaxA.Text = string.Format("{0:c2}", NetTaxA);
}
What that script is doing is taking the accumulated amount in the NetTaxA and formatting it to display as a string and placing it in the xrNetTaxA field as text
If you work your way up the design panel in each of the groupfooter bands, for example, click on the xrTableCell118 in GroupFooter5 in the DetailReportItemLoan band which is for the Tax A sum for all loan items, open its Scripts properties, you will see that it has a script in the OnSummaryCalculated of
private void OnSummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
{
if(e.Value != null)
NetTaxA += Convert.ToDecimal(e.Value);
}
And if you go to the next band above that, in the GroupFooter4 of the Misc Expense band, the field xrTableCell100 which is for the Tax A sum for all misc expenses, open its Scripts properties, you will see here too that it has a script in the OnSummaryCalculated of
private void OnSummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
{
if(e.Value != null)
NetTaxA += Convert.ToDecimal(e.Value);
}
Continue checking each of the fields in teh design panel in the groupfooters, and you will see each of those for Tax A has a script that keeps a running total of all Tax A so that it accumulates to place the total tax A into that xrNetTaxA field in the ReportFooter1
That is how the total tax A is accumulated to show in that field in the report footer.
Also note that in the Scripts property of the ReportHeader band, that NetTaxA is declared and what its initial value is so that each workorder report is zero’d out before hand
decimal NetLabor = 0;
decimal NetTravel = 0;
decimal NetPart = 0;
decimal NetMiscExpense = 0;
decimal NetLoan = 0;
decimal NetTaxA = 0;
decimal NetTaxB = 0;
decimal GrandTotal = 0;
I do encourage you to refer to the sample report templates, and work your way backwards from the field that you want to do similar to, so that you can see how we have done the sample. If you have additional questions, do always provide specifics so that I can help.