AyaNova service management & work order software
AyaNova Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Sample Part Profit / Loss report template Expand / Collapse
Author
Message
Posted 6/22/2007 10:18:34 PM
AyaNova Sales & Support

AyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & Support

Group: Administrators
Last Login: Today @ 7:20:51 AM
Posts: 1,703, Visits: 4,009
Below is link to a sample Part Profit / Loss report template for the Parts grid in the Service navigation pane.

Part Profit Loss Report Template

ReportHeader band has a OnBeforePrint script to identify the items we will use in this report template

decimal TotalPartNetCost = 0;
decimal TotalPartNetPrice = 0;
decimal PartProfitLoss = 0;

This report template is grouped by the client and displays the workorder number associtated with the part record, quantity, cost per part, price per part, total cost for that record, total net price (no taxes) for that record.

Total cost for the part record is obtained via an OnBeforePrint script for the field determining the value of cost multiplied by quantity, and also keeping a running total of this for the profit / loss as well as summary

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this gets the value of the cost of the part and multiples it by the quantity to display in this field what the Net Cost is

xrLabel19.Text = string.Format("{0:c2}", (Convert.ToDouble(GetCurrentColumnValue("LT_WorkorderItemPart_Label_Cost"))) * (Convert.ToDouble(GetCurrentColumnValue("LT_WorkorderItemPart_Label_Quantity"))));

//this keeps a running total of the net cost for display in the groupfooter
TotalPartNetCost += Convert.ToDecimal((Convert.ToDouble(GetCurrentColumnValue("LT_WorkorderItemPart_Label_Cost"))) * (Convert.ToDouble(GetCurrentColumnValue("LT_WorkorderItemPart_Label_Quantity"))));
}

The total net for the part also has an OnBeforePrint script to keep a running total used for the report profit / loss as well as summary

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{

//this keeps a running total of the net price charges for display in the groupfooter and use in determining profit / loss
TotalPartNetPrice += Convert.ToDecimal(Convert.ToDouble(GetCurrentColumnValue("LT_UI_Label_NetValue")));
}

The summary Cost field is obtained by an OnBeforePrint script calling that running total

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrTotalPartNetCost.Text = string.Format("{0:c2}", TotalPartNetCost);
}

As is the summary Net field

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrTotalPartNetPrice.Text = string.Format("{0:c2}", TotalPartNetPrice);
}

And than it displays a Part Profit  / (Loss) at the end of the report which is determined by an OnBeforePrint script which mulitples the cost from the net

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrPartProfitLoss.Text = string.Format("{0:c2}", (TotalPartNetPrice - TotalPartNetCost));
}

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

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3262
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: AyaNova Sales & Support

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 10:23pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.062. 13 queries. Compression Disabled.