在做报表时oql语句中有时需要用到用户自定义函数,调用之后报表报错:“
对数据集“DataQuery”执行查询失败。 'fn_GetLevelItemCatName' 不是可以识别的 函数名称。 ')' 附近有语法错误。 “
,于是我将oql语句解析后拿sql语句到sql server 2008中去执行报错:
'fn_GetLevelItemCatName' 不是可以识别的函数名称。
这种问题解决方案:找到C:/Program Files/Microsoft SQL Server/MSRS10.MSSQLSERVER/Reporting Services/ReportServer/bin/udf.xml文件添加权限代码 <udf function="fn_GetLevelItemCatName" owner="dbo"/>就OK了
C:/Program Files/Microsoft SQL Server/
MSRS10.MSSQLSERVER/Reporting Services/ReportServer/bin/udf.xml