3 Replies Latest reply on May 7, 2013 1:35 PM by prog

    page item (date picker)

      I have added a date picker to my report . and in the report source I've added a where clause to filter the report as per the selected date(which is one of the columns in the table) but there is nothing shown.
      where DATE =:P23_DATE

      when I remove the where clause all the records appear and when I return it ..nothing there.
      can someone help me?

      Edited by: Beena-IT on May 4, 2013 7:19 AM
        • 1. Re: page item (date picker)
          Please share the code you are trying to run.

          Can I assume that the attribute DATE is a true date?

          • 2. Re: page item (date picker)
            Howard (... in Training)
            You have data, that's good. You've isolated the problem to what seems to be the WHERE clause, good. The WHERE clause is simple, good. So, it would seem DATE NOT = :P23_DATE for your query.

            Remember -- or note, if you didn't know this -- page items are (always?, mostly) character strings. As Jeff intimates, if DATE is a date, you will get implicit date conversion in your WHERE clause. (BTW, isn't DATE a Reserved Word?) May I suggest trying "DATE = TO_DATE(:P23_DATE,'your date format here')" to make it an explicit conversion?

            Also, I recommend running any query you are having a problem with in the APEX SQL Commands window. Then you can immediately see what APEX is returning for your query. It helps my debugging a lot.

            • 3. Re: page item (date picker)
              Yes that was correct