Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2015
    Posts
    61
    Provided Answers: 4

    Unanswered: Expression not working in SSRS expressions builder

    Can any one tell me why expression builder is not accepting expressions it shows to be valid? If you look at the examples it gives on the left side of the window you see "="Tomorrow is " & DateAdd("d",1,Today())" but if you cut and paste "DateAdd("d",1,Today())" example to the expression window it gives error on the parenthesis after Today(). In my case I am trying to default a date selection to 30 days back from today. I thought it was my expression but seeing it gets the same error on the example they show I'm not sure this isn't a bug.

    Click image for larger version. 

Name:	Untitled.jpg 
Views:	3 
Size:	93.2 KB 
ID:	17173

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,862
    Provided Answers: 17
    It is probably some minor bug in the parser. I just tried on Data Tools 2014, and I get the same results on the parentheses after Today, but running the report gives the correct result.

  3. #3
    Join Date
    Mar 2015
    Posts
    61
    Provided Answers: 4
    Thanks for your response MCrowley. I came to the conclusion the only way to do this is to create a new dataset to get the date. The only requirement is the date must be in the drop down.

    SELECT CAST(DATEADD(WEEK, - 4, MAX(MailDate)) AS VARCHAR(10)) AS MailDate
    FROM FULF_Cycle_Table

Tags for this Thread

Posting Permissions

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