Crystal report date parameter and sql expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alain Groleau
    New Member
    • Aug 2011
    • 3

    Crystal report date parameter and sql expression

    Hi !!

    I have a problem that i'm sure is very simple to solve but it's driving me nuts ....

    Here is my SQL expression ...

    (select count("Emti_Bas e1"."Date_ouv ") from emti_base1 where convert(varchar (10),"Emti_Base 1"."Date_ouv",1 10) = '{?startdate}')

    the date format in my emti_base1.date _ouv table is:
    2011-07-14 00:00:00

    My crystal report file/options/date and format field are set to respect the convert to 110 format in sql :
    07-14-2011

    What am i missing ??? it simply doesnt work.....

    Thanks alot everyone
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Is this a SQL Server question or an MS Access?


    ~~ CK

    Comment

    • Alain Groleau
      New Member
      • Aug 2011
      • 3

      #3
      Its sql server 2005 and crystal report X

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        What exactly is the problem you are experiencing with your query?


        ~~ CK

        Comment

        • Alain Groleau
          New Member
          • Aug 2011
          • 3

          #5
          For some reason my query wont get the value of the parameter '{?startdate}'. It compares startdate instead of the value in startdate...

          Comment

          • ck9663
            Recognized Expert Specialist
            • Jun 2007
            • 2878

            #6
            Then it's more of a crystal report and not a sql server question :) Have you tried posting it in MS Access?

            Good Luck!!!


            ~~ CK

            Comment

            Working...