Skip to Content
author's profile photo
Former Member

Help please!

Post Author: hd1

CA Forum: Crystal Reports

I have a report that sorts by three parameters. The first one is a matter number relating to clients, the other two are beginning and end date. The report runs great except for one thing, it doesn't filter out the dates. It will sort out all of the other information which is good. For example, I run my report and enter in the information and when the report is done it will give me the matter number with the attorneys and show fees, costs, rates, etc. The problem is that it adds up everything not the information I would need from 1-1-2007 to 6-1-2007, or whichever date I desire. My tables are linked correctly, so I'm not sure what is going on. Could some please help?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

14 Answers

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 08:17 PM

    Post Author: palm

    CA Forum: Crystal Reports

    HI,

    Check these , in the RecordSelection formula see whether you filtering on start and end dates

    If you already have those in , then the problem might be compatability of the format of the date in calander and in the database date field

    If they dont match then the date condition fails in recordselection and it dont filter on the date and you wont get the total in that date range

    Update me!!!!!!!!

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 08:48 PM

    Post Author: hd1

    CA Forum: Crystal Reports

    I checked the data fields and the dates are the same format 1/1/2007, so they match up. When I created the parameters I just dragged them in the report. Now I put them in the record selection along with my others like so:

    {timecard.tbillhrs} <> 0.00 and{matter.mmatter} = {?Matter} and{periodt.pebedt} = {?Beginning Date} and{periodt.peendt} = {?End Date}

    But now when I enter my dates I don't get a blank report. But when I remove them, my data comes back.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 08:53 PM

    Post Author: SKodidine

    CA Forum: Crystal Reports

    The trouble might be because you are equating to the begin and end dates, which will force it to fetch only if the date matches. Try this:

    {timecard.tbillhrs} <> 0.00 and{matter.mmatter} = {?Matter} and{periodt.pebedt} >= {?Beginning Date} and{periodt.peendt} <= {?End Date};

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 08:58 PM

    Post Author: hd1

    CA Forum: Crystal Reports

    FANTASTIC! I guess the way I had it the first time confused it. It's that programming experience you have isn't it. :-D Thanks again! So is it saying {periodt.pebedt} >= {?Beginning Date} is greater than or equal to and {periodt.peendt} <= {?End Date} is less than or equal to?

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 09:08 PM

    Post Author: hd1

    CA Forum: Crystal Reports

    its working, but some data just doesn't add up. On some of my numbers I'm off a few digits, what could cause that?

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 10:16 PM

    Post Author: SKodidine

    CA Forum: Crystal Reports

    For your previous post the answer is YES. Now for this one, post some data that you think is wrong so that we can get a better understanding.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 10:33 PM

    Post Author: JKitz

    CA Forum: Crystal Reports

    Use this selection instead:{timecard.tbillhrs} <> 0.00 and{matter.mmatter} = {?Matter} and{periodt.pebedt} in {?Beginning Date} to {?End Date}Also make sure that {periodt.pebedt} is not a DateTime field. you can change you selection to:{timecard.tbillhrs} <> 0.00 and{matter.mmatter} = {?Matter} andDate({periodt.pebedt}) in {?Beginning Date} to {?End Date}Just in case. Probably not the case, but worth a shotAnd please post some data for us and we can figure it out

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 10:41 PM

    Post Author: SKodidine

    CA Forum: Crystal Reports

    JKitz:

    HD1 has a DB begin date and a DB end date. With your suggestion, he would only be checking to see if the begin date is between the parameter dates. What about the end date?

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 11:20 PM

    Post Author: hd1

    CA Forum: Crystal Reports

    Sorry for not getting back sooner, work got crazy. Thanks for your repsonses, I appreciate the help.

    {timecard.tbillhrs} <> 0.00 and{matter.mmatter} = {?Matter} andDate({periodt.pebedt}) in {?Beginning Date} to {?End Date}

    Enter this formula increased my results quite a bit, so I wouldn't be able to use this one, the other one said "A date is required here" {periodt.pebedt}

    Not sure what that meant. I asked the account person and they were looking up my results and were saying that somewhere in my selection criteria, it was leaving something out. They weren't sure if it was the beginning month or the end month. So maybe just modifying the selection somehow.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:13 AM

    Post Author: JKitz

    CA Forum: Crystal Reports

    Sorry, you are absolutely right, I missed the database end date. The original formula was correct using <= and >=. Not sure why the result would not tie out. Can you paste in some of the results with both correct and incorrect data (maybe highlight the incorrect data)

    Add comment
    10|10000 characters needed characters exceeded