Hello All,
Working with SQL Server 2016 and Report Builder.
In Report Builder, inside a Textbox I have the following expression shown below, that doesn't appear to be working. If I use the same expression/functions in an SQL Query, it works just fine.
The resulting output from this function shows the date of Sunday of the Previous week. So for example, today is 8/10/2020, so it should result in the Date"August 02, 2020". But, I get an error instead.
=format(DateAdd("week",-1,DateAdd("week",DateDiff("week",0,getdate()),0)) - 1, "MMMM dd, yyyy")
So basically, in Report Builder, I'm trying to show a date range. THe Report shows all the data from the previous week's Sunday through Saturday. So I'm trying to display that in the Report, something like"Results for: August 02, 2020 to August 08, 2020".
The error in report builder, when I click Run, says:
The Value expression for the textrun ‘Textbox14.Paragraphs[0].TextRuns[0]’ contains
an error: [BC30451] 'getdate' is not declared. It may be inaccessible due to its protection level.
Any ideas what I'm doing wrong here?
Matt