Hi,
I'm deploying a report to Dynamics 365 v9 (online)
In visual studio it's possible to do an expression like:
=DatePart(DateInterval.WeekOfYear, Fields!DateField.Value, FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFourDays)
But when uploading the report to Dynamics I get an exception:
Microsoft.Crm.CrmReportingException: The report server has RDLSandboxing enabled and the Field expression for the dataset 'dsResult' contains a reference to a type, namespace, or member 'FirstDayOfWeek' that is not allowed. Change the expression to include only allowed namespaces, types, and members.
Without the FirstDayOfWeek and FirstWeekOfYear parameters DatePart function defaults to US settings it seems.
For example: 2018-01-14 will give me week no 3 but in Sweden it should be 2.
- FirstDayOfWeekValue
- Type: Microsoft.VisualBasic.FirstDayOfWeek
Optional. A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week. If not specified, FirstDayOfWeek.Sunday is used.
- FirstWeekOfYearValue
- Type: Microsoft.VisualBasic.FirstWeekOfYear
Optional. A value chosen from the FirstWeekOfYear enumeration that specifies the first week of the year. If not specified, FirstWeekOfYear.Jan1 is used.
I have changed system settings/format in Dynamics first day of week and first week of year and have also specified language sv-SE in the report.
Is there another way?
Regards/Tomas