Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In crystal reports 2011 i need to calculate a time interval and divide it

Status
Not open for further replies.

JeanCarlo

Programmer
Aug 21, 2012
2
I need a help to develop a way to get some values ​​and add them to divide your result.

I am new to Crystal reports'm in my first project and I do not understand well how to build this formula, I have a table in my database that receives values ​​of 5 in 5 minutes, this table have a field string with a description of the item inserted a value field which receives a float and a field with a datetime.

My calculation is based on hours, in 1 hour I have 12 records need to get these 12 records to add them and then divide by 12.

Valor Field DateTime Field
112,46 16/08/2012 00:02:54
111,83 16/08/2012 00:07:58
111,66 16/08/2012 00:13:02
111,83 16/08/2012 00:18:07
112,39 16/08/2012 00:23:11
112,56 16/08/2012 00:28:15
112,12 16/08/2012 00:33:19
112,49 16/08/2012 00:38:23
112,18 16/08/2012 00:43:28
112,09 16/08/2012 00:48:32
111,58 16/08/2012 00:53:36
111,61 16/08/2012 00:58:40

Calculates these values ​​and divide by 12

Would you like some help to develop this formula, but do not know where to start.

Thank you.
 
Can you give more details, ie showing result you expect and how it was calculated.

Ian
 
Hi IanWaterman.

I believe I have solved this problem, I used a grouping field for date and time and the sort order of the group selected for each hour, so I got my 12 and used a record sum totalizer field and a formula that divides this field recorder, I will do some more tests and see if that solves my problem even.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top