我在德国有一个客户端使用SSRS报告,而date参数显示的是"OKT“,我们需要它在10月份是"OCT”。
是否有一个设置来确保GETDATE()
已经被转换,或者转换函数是否能工作?
以下是我的错误:
library!ReportServer_0-45!1554!10/15/2018-10:23:17::I INFO: RenderForNewSession('/Finance/MC仪表板‘) processing!ReportServer_0-45!10bc!10/15/2018-10:23:17::e错误:为dataset 'JournalEntries’抛出Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:,Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:查询执行失败。-> Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException:查询(5,39)不能将文本类型的值“Okt 14,2018”转换为类型日期。在Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider.ExecuteTabular(CommandBehavior行为,ICommandContentProvider contentProvider,AdomdPropertyCollection commandProperties,IDataParameterCollection参数)
发布于 2018-10-16 10:17:26
由于GetDate是从服务器上以德语传递的,所以server函数也应该使用德语将其转换为日期。
CONVERT(DATETIME, GETDATE(), 106)
如果确实有错误,您可能需要先设置语言(SET language德语;)--尽管一个SQL函数用德语工作,而另一个SQL函数却不能工作,这是不正确的。
发布于 2018-10-16 10:55:38
只需在文本框中首先捕获数据并检查其格式。取决于它的外观,您可能会更糟糕地将这个接收输入参数转换为内部varchar,然后将日期部分取出。即
declare @internal_param as varchar(15);
set @internal_param = @Input_dateParam --your variable name here
--select logic here
https://stackoverflow.com/questions/52839285
复制