Results 1 to 4 of 4

Thread: Show Time Range

  1. #1
    Join Date
    May 2007
    Posts
    2

    Wink Unanswered: Show Time Range

    Hi All, I am using crystal report for Visual Studio 2003.
    My report is on daily basis. Data is taken from MS SQL DB 2K.
    If data is not present for one specific then I need to just let it be empty.
    e.g.
    Time | 8:00|8:10| 8:20|8:30 |8:40 |8:50|9:00|...

    I wanna generate time start from 8 am to 8 pm , interval : 10min.
    How to generate the times and show in report?
    Plus each time interval may be will have more than one record. Example :
    at 8 am, production cut 3 size. each size is different qty.
    HOw to put 3 records into same time interval?
    Any one got any idea for my problems?
    Really appreaciate your help

    Thanks in Advance.

    Best Regards,
    Kisetsu

  2. #2
    Join Date
    Feb 2007
    Posts
    348
    How to generate the times and show in report? - you gotta have a time field coming in. If you don't, no go. Now it may be wrapped in with your date field so look closely.

    Plus each time interval may be will have more than one record. Example :
    at 8 am, production cut 3 size. each size is different qty.
    HOw to put 3 records into same time interval?
    -Well, it goes back to your time field. You have to look at how it pulls the time. Is it grabbing the time the job is sent or the time it is performed, it may depend on what device is providing the time.

    Any one got any idea for my problems? - it all comes down to what is in the data. Crystal can't make new data, it can only help you turn what you have into information.

    I assume you will be asking how to set up the time intervals. You'll have to use groups and maybe even a calculated field. The field would break the time into one of 72 groups then your grouping would group by the field value and you would use a custom label that uses a switch statement, probably.

  3. #3
    Join Date
    May 2007
    Posts
    2
    Hi , May you explain more clearly for " You'll have to use groups and maybe even a calculated field. The field would break the time into one of 72 groups then your grouping would group by the field value and you would use a custom label that uses a switch statement, probably " ?

    Thanks in advance!

  4. #4
    Join Date
    Feb 2007
    Posts
    348
    lemme get back to you, hopefully today, with code.

    EDIT: Take a look at the attached, it covers all your questions as I understand it. The calculated field could probably be done easier than that but it was quick and dirty. Then I grouped on the field.
    Attached Files Attached Files
    Last edited by starkmann; 05-24-07 at 10:00. Reason: adding test data

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •