Report Date Range Errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ckpoll2
    New Member
    • Sep 2006
    • 76

    #1

    Report Date Range Errors

    Hello,

    I have a report that presents data based on a query that is built into the report. It asks for a start date and end date. When I type in 5/1/07 and 5/20/07, for example, there are no problems. It returns the data in that range. But when I type in 5/1/07 and 5/25/07, it tells me "The expression is typed incorrectly, or it is too complex to be evaluated..."

    This is the same error message that I get when I enter a date that doesn't exist, like 4/31/07, but 5/25/07 obviously is a real date. Why is it doing this and what can I do to get it to work properly?

    Thanks for your help,

    Charlie
  • MSeda
    Recognized Expert New Member
    • Sep 2006
    • 159

    #2
    Can you post the SQL for your query?

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      Originally posted by ckpoll2
      Hello,

      I have a report that presents data based on a query that is built into the report. It asks for a start date and end date. When I type in 5/1/07 and 5/20/07, for example, there are no problems. It returns the data in that range. But when I type in 5/1/07 and 5/25/07, it tells me "The expression is typed incorrectly, or it is too complex to be evaluated..."

      This is the same error message that I get when I enter a date that doesn't exist, like 4/31/07, but 5/25/07 obviously is a real date. Why is it doing this and what can I do to get it to work properly?

      Thanks for your help,

      Charlie
      Try deleting the Parameters and typing them back in.

      Comment

      • ckpoll2
        New Member
        • Sep 2006
        • 76

        #4
        Here's the SQL for the query that the report is driven by:

        SELECT [Personal Property Hours].[Transaction Number ID], [Personal Property Hours].Date, [Personal Property Hours].Name, [Personal Property Hours].Site, [Personal Property Hours].Type, [Personal Property Hours].[Tech Input Items], [Personal Property Hours].Items, [Personal Property Hours].Hours, [Personal Property Hours].Notes
        FROM [Personal Property Hours]
        WHERE ((([Personal Property Hours].Date)>=[Enter Start Date (MM/DD/YY)] And ([Personal Property Hours].Date)<=[Enter End Date (MM/DD/YY)]));

        Any thoughts?

        Comment

        • ckpoll2
          New Member
          • Sep 2006
          • 76

          #5
          I was just now playing with it and found that it seems to have a problem with dates in 2007, but not with 2006. If I enter 5/31/06 as the end date, it's fine. But if I enter 5/31/07, it gives me the error message. Does this help at all?

          Comment

          • FishVal
            Recognized Expert Specialist
            • Jun 2007
            • 2656

            #6
            Originally posted by ckpoll2
            Here's the SQL for the query that the report is driven by:

            SELECT [Personal Property Hours].[Transaction Number ID], [Personal Property Hours].Date, [Personal Property Hours].Name, [Personal Property Hours].Site, [Personal Property Hours].Type, [Personal Property Hours].[Tech Input Items], [Personal Property Hours].Items, [Personal Property Hours].Hours, [Personal Property Hours].Notes
            FROM [Personal Property Hours]
            WHERE ((([Personal Property Hours].Date)>=[Enter Start Date (MM/DD/YY)] And ([Personal Property Hours].Date)<=[Enter End Date (MM/DD/YY)]));

            Any thoughts?
            Hi.

            Date is reserved word. I'm not sure whether it is a reason.
            In such a case it is recommended to use "!" operator instead of "."

            I mean replace e.g.[Personal Property Hours].Date with [Personal Property Hours]![Date]

            Good luck.

            Comment

            • ckpoll2
              New Member
              • Sep 2006
              • 76

              #7
              That didn't take care of the problem. Any other ideas? Would it help at all if I posted a copy of the database?

              Comment

              • ckpoll2
                New Member
                • Sep 2006
                • 76

                #8
                I've found that the problem isn't with the query itself because when I run it, it works just fine. It seems to be something with the actual report. Does this help any?

                Comment

                • ckpoll2
                  New Member
                  • Sep 2006
                  • 76

                  #9
                  Does anyone have any thoughts? I'm really stuck with this one. I would appreciate any help that you could provide.

                  Comment

                  • FishVal
                    Recognized Expert Specialist
                    • Jun 2007
                    • 2656

                    #10
                    Originally posted by ckpoll2
                    Does anyone have any thoughts? I'm really stuck with this one. I would appreciate any help that you could provide.
                    Hi!

                    You've posted in msg#8 that query itself works fine. Error message appears when data from query is passed to the report. You should post code from report module to give an ability to anyone to have thoughts.

                    Will be glad to help you.

                    Comment

                    Working...