Sample Meter Reading Report that displays Difference

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

**Or if using AyaNova 6 or 7, Download the AyaNova 7 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: dir=ltr " ">

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”));