Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Using Variables? Post Reply Post New Topic
Author Message
AnnesCrystal
Newbie
Newbie


Joined: 22 Apr 2014
Online Status: Offline
Posts: 1
Quote AnnesCrystal Replybullet Topic: Using Variables?
    Posted: 22 Apr 2014 at 9:40am
Hello!
I hope that someone can help me solve this tricky question:

I have an electrician counter. Every hour, every day the counter data are logged.

Year     Month     Day     Hour     Counter
2014     1     31     8 pm     6.857.660,00
2014     1     31     9 pm     6.857.820,00
2014     1     31     10 pm     6.857.970,00
2014     1     31     11 pm     6.858.110,00
2014     1     31     12 pm     6.858.270,00

By subtracting the counter data at 11 pm from the counter data at 12 pm you get the electricity produced the last hour.

I want to calculate the electricity produced every month.

I tried to use Variable in my formula to seek out the counter data at 12 pm the last day in the month, but I canīt seem to make it work.

/Anne
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 22 Apr 2014 at 12:24pm
you could do
in select expert

day = day(dateserial(year(currentdate),month(currentdate)+1,1-1))
hour in ("11 pm","12 pm")
then a formula
minimum(counter) - maximum(counter)

assuming that counter at 12 pm always higher
IP IP Logged
hello
Groupie
Groupie
Avatar

Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
Quote hello Replybullet Posted: 23 Apr 2014 at 9:32am
dateserial

the most useful CR function of them all (JMO).
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.029 seconds.