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!

I have a table for a fax server wit

Status
Not open for further replies.

MehranCrystalUser

Technical User
Nov 3, 2003
4
US
I have a table for a fax server with Begining DateTime stamp and Ending DateTime stamp for each fax. I also have number of pages per fax.

I need to find out on a 5 minute interval per day how many concurrent fax channels I am using? I also want to graph this on chart showing Channel usage per hour

How do I do a grouping on a 5 minute interval?

I am a new 8.5 Crystal user

Thanks in advance
 
Hmmm...this is interesting. I think this is really much more a a data question than a Crystal question. A litle clarification would be helpful. First, do you want to show how many channels are in use using a format similar to?:

Time # of Faxes
------- ----------
8:00 a.m 5
8:05 a.m. 2
8:10 a.m. 7

If not, how do you want to show your data. A sample of the desired output would be helpul.

If the above is similar to what you want, what do you do with a call that starts at 8:04 and ends at 8:07? Is it counted in both groups?
 
Yes . I gave it some more thought :

I need to find if the start of the fax time is in the fax interval of the previous 24 records ( 24 channels and the data is sorted by time stamp). If it is then I need to add 1
to channel usage.

I know I can look at the previous records field value using the Previous but how do I look up up to 24 records before the current record?

Thanks in advance
 
Ok, now I really don't understand your requirement. From your first post, it seemed that each record represented a fax transmission. Grouping on 5 minute intervals is simple enough, once you define how to deal with start and stop times. But How does 24 channels correlate to five minute intervals? Suppose you only have 12 fax calls in one five minute period, 6 in the next and 4 in the third five minute interval. You haven't even reached 24 channels at that point. I think if you gave a listing of sample data (what each record looks like) and what you want your output to look like, it would be very helpful.
 
Sorry about the confusion. Your reply made me look at the problem in a differnt way . I have records in the Following format sorted by Satrt Fax Date/Time in ascending order:

Record ID , Start Fax Date/Time, End Fax Date/Time, Pages

What I need is to find out how many concurrent Channels I am using at each Fax start time. I though I can chop up the day in 5 minute intervals and find if each transmission falls in that 5 minute range and graph it.

But a more elgant solution is to look back at the previous 24 records and see if the Start Fax Date/time is in the fax interval time of the record. If it is then increase the counter . If it is not then move on until the 24 previous records are checked.

My challenge though is how to look at the data values of 24 previous records.
 
Ok, so let's say you have 24 records. On the 25th record, you want to look back at the previous 24 and see if any of those previous 24 records has an Ending time during the time span of the 25th call? Is that correct? And if it does, increase a counter by 1. Then, on the 26th call, repeat the process for records 2 - 25?
 
This is correct? and then from 25 th record on you repeat the process. How can you implement this with Crystal and graph the concurrent connections against the fax start time?
 
This problem, I think, uses recursive logic. I am not good at recursive logic. I don't even have a clue of how you would do that in Crystal. (Well, someone might suggest a subreport, but the performance would be absurdly slow since it would be running at the detail level and, presumably, you could be running the report for 1000's of records.) If I thought long and hard about, I might be able to come up with an approach to it using a stored procedure. What is your database? Does it support stored procedures?

Perhaps one of the brigher minds on the forum will intervene and provide a better answer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top