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


Sample Detailed Workorder report template... Expand / Collapse
Author
Message
Posted 2/15/2007 10:46:23 AM
AyaNova Sales & Support

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

Group: Administrators
Last Login: Yesterday @ 5:11:14 PM
Posts: 1,778, Visits: 4,123
This report template is based off of the Sample Detailed Service Workorder with Grand Total with the differences:

  • that the taxes and line totals derived from AyaNova are removed from the detail bands 
  • and the total taxes and Grand Total at the bottom are derived from scripts instead of the AyaNova tax amounts and line totals.

Sample NEW Detailed Service Workorder with totals via scripts

1. Within the report template I removed data fields such as Tax A, Tax B and Line Total

2. In the OnBeforePrint script for the ReportHeader I added the following

decimal TotalTaxX = 0;

and remove the following as not used in this report template:

decimal NetTaxA = 0;
decimal NetTaxB = 0;
decimal GrandTotal = 0;

3. In ReportFooter1 OnBeforePrint script property I added the following which will reset the TotalTaxX back to 0 before the next workorder record prints.

TotalTaxX = 0;

and removed the following as no longer used in this report template:

NetTaxA = 0;
NetTaxB = 0;
GrandTotal = 0;

4. In the ReportFooter1,  I removed the fields xrNetTaxA, xrNetTaxB and xrGrandTotal as will not be using these

5. I created a new label xrLabel18 and edited the OnBeforePrint property with the following so that 6% is multiplied by each of the total net amounts for Labor, Travel, Parts, Loans, Misc Expenses

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel18.Text = string.Format("{0:c2}", TotalTaxX += Convert.ToDecimal(.06 * Convert.ToDouble(NetLabor + NetTravel + NetPart + NetLoan + NetMiscExpense)));
}

If you do not have tax on a net amount then remove it from the OnBeforePrint script. For example, if you only charge tax on Parts and Loans, then edit the script so it instead shows as

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel18.Text = string.Format("{0:c2}", TotalTaxX += Convert.ToDecimal(.06 * Convert.ToDouble(NetPart + NetLoan)));
}

6. I created a new label xrLabel19 and edited the OnBeforePrint property with the following so that the Grand Total is derived from adding the net of Labor, Travel, Parts, Loans, Misc Expenses and TotalTaxX from the xrlabel18 field.

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel19.Text = string.Format("{0:c2}", (NetLabor + NetTravel + NetPart + NetLoan + NetMiscExpense + TotalTaxX));
}


AyaNova Sales & Technical Support
http://www.ayanova.com
Post #2792
« 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 8:16pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Disabled.