Hi All
I am using Crystal XI to produce a report that will give me the usage for date range. My report is as follows;
GH1 {machine no}
Details: {reading date} {trigger reading} {trigger code}
{@declarehours}
Which displays as;
3212
5/7/10 13050 HRS
6/7/10 13059 HRS 9
9/7/10 13081 HRS 22
13/7/10 13093 HRS 12
3213
4/7/10 12778 HRS
5/7/10 12784 HRS 6
8/7/10 12805 HRS 21
14/7/10 12849 HRS 2
I need to work out how many HRS this machine has done within a date range and have tried to use the three formula trick to set up a 'running total', but it isn't working. The formulas I have used are;
@declarehours in details
whileprintingrecords;
numbervar hours;
hours:={trigger reading}-previous{trigger reading};
@resethours in GH1
whileprintingrecords;
numbervar hours:=0; (this isn't resetting)
I need to display the sum of @declarehours in GF1. I have used a variety of formuals to 'sum' @declarehours but it keeps giving me the las @declarehours doubled. ie; 3212, 24 and 3213, 4.
I beleive there is something wrong in my @declarehours as it is not resetting.
I hope this coherent and am very grateful for any suggestions.