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


Sample report template displaying individual... Expand / Collapse
Author
Message
Posted 3/20/2007 12:24:57 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: Yesterday @ 4:59:45 PM
Posts: 1,868, Visits: 4,328
Here is a further customization of the Sample Detailed Service Workorder with Grand Total report template - an AyaNova user had requested help as they only have one tax (am using Tax B only and referring to it as VAT) and in the report template they wish each indivdual tax total to display at the bottom of the report (i.e Total Part Tax separate from Total Labor Tax etc)

If you would like to see how this was done, download the sample report template, import and refer to each of the steps below while viewing the report template in the designer:

Sample Report with Indivdual Tax Totals Using Tax B Only

1. Added to the existing OnBeforePrint script for the ReportHeader1 to include the variables for each of the individual taxes we will be keeping a running total of for the bottom of the report template, and commented out the existing NetTaxA and NetTaxB

decimal NetLaborVAT = 0;
decimal NetPartVAT = 0;
decimal NetTravelVAT = 0;
decimal NetLoanVAT = 0;
decimal NetMiscVAT = 0;

//decimal NetTaxA = 0;
//decimal NetTaxB = 0;

2. In the original Sample Detailed Service Workorder with Grand Total in each GroupFooter for each band (Labor, Parts, Travel, Loans and Misc Exp), there was a summary displaying the group sum of Tax A and summary displaying the group sum of Tax B.  The fields referring to Tax A were removed from each of these GroupFooters.

3. Select the data field for displaying the Tax B group sum in the Labor's GroupFooter2 (field xrTableCell35), and edited the existing OnSummaryCalculated script for this field to instead keep a running total to NetLaborVAT instead of to NetTaxB

4. Did the same for the data field for Tax B for Part, Travel, Loan and Misc Expense - editing the OnSummaryCalculated script to use the appropriate variable i.e NetPartVAT, netTravelVAT etc

5. In the ReportFooter1 properties, edited the OnBeforePrint to comment out the variables NetTaxA and NetTaxB as no longer used

6. Added new table fields in the ReportFooter1 band for the additional label fields to display tax for Labor, specific tax for Parts, etc

7. Added new script OnBeforePrint for each of these new fields to obtain the displayed amount for NetLaborVAT, NetPartVAT etc - if you select for example, the field xrTableCell92 (field under the field labeled Net Labor VAT), and view the OnBeforePrint script you will see that it has the script

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

8. Print previewed the report and ensured no error messages. Saved the report.

This sample report template is provided to assist those that may want to edit other report templates summaring totals at the bottom of a detailed report template.

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #2944
« 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 7:48am

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