Results 1 to 8 of 8

Thread: Crystal Reports

  1. #1

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854

    Crystal Reports

    Ok, I have a database with a field name of detention date. This field stores the most recent detention date in it. So my question is in crystal reports how do I sort it out so It will only print the data if the field "detention date" that has the today's date?

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    In the record select formula add

    {TableName.DetentionDate} = CurrentDate

  3. #3

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    Ill try that and see if it works tonight...

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  4. #4

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    That didnt work. All's that did was put the most current date on top and the other dates on the bottom. What I need to do is only display the current date.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Without seeing your report, then I can only guess as to what has happened.

    If adding the code I posted changed the sort order then you may have placed it in the wrong location. Make sure it goes in the Record Selection Formula.

  6. #6

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    Here is the entire proj. With the reoport. You made need to edit it so it will work on your PC. I am using the ld(converted).mdb database for the proj.
    Attached Files Attached Files

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  7. #7
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381
    VB Code:
    1. {TableName.DetentionDate} = "CurrentDate"

    I look at it briefly. I say remove the quotes on the CurrentDate. Also, your detention date is actually a MEMO field. You need to convert this first into a date format by using CDATE.

    VB Code:
    1. CDATE({TableName.DetentionDate}) = CurrentDate


    Also, you may have a problem if the field "detentiondate" contains more than a date. (i.e. If it has remarks before and after the detention date itself, how would you be able to pick out the date within the memo remarks?)

  8. #8

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    The code doesnt filter dates. I need Crystal Reports Code that will filter the current date. So on the report the current date is the only date shown.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

Posting Permissions

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



Click Here to Expand Forum to Full Width