Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: hourly report Post Reply Post New Topic
Author Message
mikethemod
Newbie
Newbie
Avatar

Joined: 20 Oct 2011
Location: Canada
Online Status: Offline
Posts: 8
Quote mikethemod Replybullet Topic: hourly report
    Posted: 31 Oct 2011 at 10:56am
OK i have tough one
 
I have a report that I run every our it totals revenue made during the hours and adds it up this part is working great,
 
now I have been asked to include the previous weeks total by hour.
 
so let say it is October 31 at 4 pm my report looks like this
 
coin in         jackpot         win
100.00       2000             3000
 
this is the total for current day from 4am to 4pm now every hour I run it it will add the next hours to the total.
 
what I need to do now is the following
 
Oct 31 coin in         jackpot         win
           100.00       2000             3000
Oct 24 coin in         jackpot         win
           100.00       2000             3000
 
 
now keep in mind curent day Oct 31 is working what I need to to beable to report the number for prevous monday current time.
 
this is the formaul I use for curretday
 
date(dateadd('h',-4,{HC_PRIME_REPORTDATA.dtTime})) = dateadd('d',
(if currenttime in time(0,0,0) to time(4,15,0) then -1 else 0),currentdate)
 
If I adjust it be adding a -7 at end of currentdate it returns the complete 24 hours from 7 days ago when all i need it to report is the total from senven days ago at the current time to compaire to todays current total.
 
its a very simple report in that it only uses one table. the data is tabled every 15 minutes
 
below is an explination of what in the table
\
ColumnName  Definition 
iReportDataID  Unique Id for the transaction
dtTime  Date and Time the Headcount app scans the BIN files within the MMT
iHour  24 hours starting at  0 and ending at 23
iMinute  every quarter hour that the BIN files at scan and an entry is made to the table
mDenomination  an entry for each quarter hour group by denomination.
iGamesInPlay  number of games that are in play.
mCoinIn  Total In 
mCoinOut  Total Out 
iGamesStarts  Gamestarts is the number of times the game has been played.  Does not matter how many coins are bet.  It is the number of times the handle has been pulled or the spin button has been pushed
iTotalSlots  Total number of total games in group by denomination
iCardedPlay  Total number of games with carded play.
iNonCardedPlay  Total number of games with  non - carded play.
iTicketsIn  Total numbers of tikets in
iTicketsOut  Total numbers of tikets out
iJackpots  Number of Jackpots
iFills  Number of machine Fills
iPBTIn  Refers to the amount of personal banker promo/cash that has been downloaded 
iPBTOut  Refers to the amount of personal banker promo/cash that has been uploaded
cCasinoCode  value from gen_casino code that the Site has.
sHour  Hour
mPBTCashDownload  total PBT cash down loaded
mPBTPromoDownload  total PBT promo dollars down loaded
mPBTRedeemCash  total  cash PTB redemptions
mPBTRedeemPromo  total  promo PTB redemptions
mPBTCashUpload  refers to cash uploaded back to the players’ accounts 
mPBTCEPCreditsOut  the number of cashable credits the players actually cashed out 
 
 


Edited by mikethemod - 31 Oct 2011 at 11:01am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Nov 2011 at 4:13am
date(dateadd('h',-4,{HC_PRIME_REPORTDATA.dtTime})) = dateadd('d',
(if currenttime in time(0,0,0) to time(4,15,0) then -1 else 0),currentdate)
and hour({HC_PRIME_REPORTDATA.dtTime})-1=hour(currenttime)-1
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.031 seconds.