Hi Community,
On a SSRS report called from AX, I need to display current week of the year. I am using Datepart("ww",today()), it works fine but by default it takes 1st January to calculate number of weeks. I need to calculate no. of weeks by taking Monday as first day of the week.
I changed the expression to Datepart("ww",today(),2,0), but when I build and deploy the report I get the below error
Error 2 System.Web.Services.Protocols.SoapException: The Value expression for the textrun ‘textbox39.Paragraphs[0].TextRuns[0]’ contains an error: [BC30519] Overload resolution failed because no accessible 'DatePart' can be called without a narrowing conversion:
at Microsoft.ReportingServices.Library.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Guid batchId, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings) C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 466 6 ReportModel
I think it may be due second parameter being date instead of datetime, but I don't know how to give datetime. Also I am not sure if this is the problem. Please help me resolve this.
Thanks
Guru