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


Sample Meter Reading Report that displays... Expand / Collapse
Author
Message
Posted 1/8/2007 11:06:18 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 @ 12:27:31 PM
Posts: 1,760, Visits: 4,098
This sample report template subtracts the previous Meter Reading (basd on the Meter Reading Date entered by the user) from the previous Meter Reading to display the difference.

Do note that the Meter Reading grid needs to be sorted by date (oldest entry first) before printing the report template so that the subtraction is correct.

Download the Sample Meter Reading Report With Difference

Import into AyaNova and access from the Meter Reading sub-grid for a unitl. If you open the report template using the report designer, you can see where the specific scripts were used to identify the difference.

actual script text is as follows:

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

//This subtracts the present Meter Reading from the MeterReadingPrevious to get the DifferenceByDate amount
DifferenceByDate = Convert.ToDecimal(GetCurrentColumnValue("LT_UnitMeterReading_Label_Meter"))- MeterReadingPrevious;

//this puts the amount of the DifferenceByDate into the field
xrTableCell6.Text = string.Format("{0:n0}", DifferenceByDate);

//This keeps a copy of the UnitMeter Reading for the next record to use
MeterReadingPrevious = Convert.ToDecimal(GetCurrentColumnValue("LT_UnitMeterReading_Label_Meter"));

}



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

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