Print Page | Close Window

hourly report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14826
Printed Date: 03 May 2024 at 9:39am


Topic: hourly report
Posted By: mikethemod
Subject: hourly report
Date 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 
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10384 - iReportDataID  Unique Id for the transaction
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr12799 - dtTime  Date and Time the Headcount app scans the BIN files within the MMT
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10383 - iHour  24 hours starting at  0 and ending at 23
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10382 - iMinute  every quarter hour that the BIN files at scan and an entry is made to the table
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10381 - mDenomination  an entry for each quarter hour group by denomination.
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10380 - iGamesInPlay  number of games that are in play.
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10379 - mCoinIn  Total In 
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10378 - mCoinOut  Total Out 
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10377 - 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
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10376 - iTotalSlots  Total number of total games in group by denomination
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10375 - iCardedPlay  Total number of games with carded play.
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10374 - iNonCardedPlay  Total number of games with  non - carded play.
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10373 - iTicketsIn  Total numbers of tikets in
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10372 - iTicketsOut  Total numbers of tikets out
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10396 - iJackpots  Number of Jackpots
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10395 - iFills  Number of machine Fills
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10394 - iPBTIn  Refers to the amount of personal banker promo/cash that has been downloaded 
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10393 - iPBTOut  Refers to the amount of personal banker promo/cash that has been uploaded
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10392 - cCasinoCode  value from gen_casino code that the Site has.
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr12687 - sHour  Hour
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10391 - mPBTCashDownload  total PBT cash down loaded
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10390 - mPBTPromoDownload  total PBT promo dollars down loaded
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10389 - mPBTRedeemCash  total  cash PTB redemptions
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10388 - mPBTRedeemPromo  total  promo PTB redemptions
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr10387 - mPBTCashUpload  refers to cash uploaded back to the players’ accounts 
http://www.crystalreportsbook.com/Forum/Tbl879_Attr.htm#Attr3327 - mPBTCEPCreditsOut  the number of cashable credits the players actually cashed out 
 
 



Replies:
Posted By: DBlank
Date 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



Print Page | Close Window