Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssrs 2008 r2 从使用DatePart的轴标签的表达式获取BC30519_Ssrs 2008 R2 - Fatal编程技术网

Ssrs 2008 r2 从使用DatePart的轴标签的表达式获取BC30519

Ssrs 2008 r2 从使用DatePart的轴标签的表达式获取BC30519,ssrs-2008-r2,Ssrs 2008 R2,我有一个类别组,轴标签的表达式如下: =DatePart("yyyy",Fields!CreateDate.Value, "Orders") 我收到以下错误: The Label expression for the chart contains an error: [BC30519] Overload resolution failed because no acessible 'DatePart' can be called without a narrowing conversion

我有一个类别组,轴标签的表达式如下:

=DatePart("yyyy",Fields!CreateDate.Value, "Orders")
我收到以下错误:

The Label expression for the chart contains an error: 
[BC30519] Overload resolution failed because no acessible 
'DatePart' can be called without a narrowing conversion.

这看起来并不复杂或不寻常,但它不起作用。有什么建议吗?

DatePart函数中的第三个参数不能是字符串。试一试

=DatePart("yyyy",Fields!CreateDate.Value)

谢谢这就解决了问题。很高兴它起作用了:)如果解决方案有用,请标记为已回答,并请重新查看您以前问题的其他答案。如果你不接受答案,你就不会得到任何新的答案。