Sample Labor Cost for Displayed Workorders report template

Below is link to a sample Labor Cost report template for the Service Workorders grid

Sample Labor Cost for Displayed Workorders Report Template

This report template will display labor cost for all workorders you have displaying in your Service Workorders or Item grid, as you can filter to only show specific workorders based on many different columns (service date, client, etc),

Download the report template, unzip using WinZip, and than import into your AyaNova as per the AyaNova Help file section (URL removed as for older version no longer supported - see the latest version of AyaNova)

ReportHeader band has a OnBeforePrint script to identify the item we will use in this report template dir=ltr " ">

decimal TotalNetCost = 0;

The GroupHeader band is above the Workorder Header band, as this is a detailed report template, but we are only displaying informaiton from the Labor band.

In the Labor band, the field xrNetCost has an OnBeforePrint script of: dir=ltr " ">

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this displays the Cost multiplied by the Service Rate Quantity
if(DetailReport1.GetCurrentColumnValue(“LT_Rate_Label_Cost”) != System.DBNull.Value)
{
xrNetCost.Text = string.Format("{0:c2}", (Convert.ToDouble(DetailReport1.GetCurrentColumnValue(“LT_Rate_Label_Cost”))) * (Convert.ToDouble(DetailReport1.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_ServiceRateQuantity”))));

///this keeps a running total of the net cost for display in the groupfooter
TotalNetCost += Convert.ToDecimal((Convert.ToDouble(DetailReport1.GetCurrentColumnValue(“LT_Rate_Label_Cost”))) * (Convert.ToDouble(DetailReport1.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_ServiceRateQuantity”))));
}

}

In the GroupFooter for this report, the field xrTotalCost has an OnBeforePrint script of: dir=ltr " ">

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this displays the running total of all Net Cost displayed
xrTotalCost.Text = string.Format("{0:c2}", TotalNetCost);
}

As always, feel free to customize this sample report template or refer to it when creating your own.