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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create date specific report

Status
Not open for further replies.

StripePR

MIS
Mar 11, 2003
3
PR
I'm trying to make a report for the casino that gives me the hours played but only for the date specified.

I have CDS_Statdetail which has a database for total hours played {CDS_STATDETAIL.TimePlayed}and {CDS_STATDETAIL.GamingDate} which gives me my gaming date (I think?)

So I'm confused as to how to proceed to include only the data of the date I specify.
 
Create a parameter of type date.

In the record selection formula (Report->Edit Record Selection Formula->Record) place something like:

{CDS_STATDETAIL.GamingDate} = {?DateParameter}

This will limit the rows to the date that the report prompts for.

-k
 
Hey that worked great! Now all I need is to figure out how to set the time that is being displayed in minutes because as it is right now it's displaying the wrong format I believe. It looks like this.

Player ID First name Last name Data date Time played
##### John Doe DD/MM/YYYY 84

So it could be 84 minutes, 84 hours, 84 seconds.... I don't know.

How can I fix that?

(I've never used Crystal Reports I'm the Computer Tech but they want me to do this for them now)
 
Find out what timplayed is stored as, since it says 84, I'd guess that it's minutes.

If you want to display it as HH:MM, then use the following formula:

numberVar dur :={CDS_STATDETAIL.TimePlayed};
numberVar hrs;
numberVar min;
stringVar hhmm;

hrs := Truncate(dur/60);
min := Remainder(Truncate(dur/60),60);

hhmm := totext(hrs, "0") + ":" + totext(min, "00");
hhmm

-k
 
Hey thank you so much. I haven't had the chance to try imputing that code because I've been resolving other casino issues regarding slotmachines hardware.

But we figure it's minutes so while I was busy doing other things they've been dividing by 60 and it adds up (More or less)

But thank you so much for all your help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top