Convert GUID to string in SQL Server Reporting Services

浪尽此生 提交于 2019-12-23 08:47:34

问题


While trying to display a GUID column in a report ..its displayed as #error..

=CStr(Fields!number.Value).ToString

I tried the above code in the properties of the column..it doesn't work..

Please advise


回答1:


=CType(Fields!number.Value, GUID).ToString



回答2:


If it is a GUID, just display it without any processing, like other data types.
In case you want to convert it for other purposes, just use ToString, for example:
=IIf(Fields!number.Value.ToString=Fields!ID.Value.ToString, "true", "false")



来源:https://stackoverflow.com/questions/12079064/convert-guid-to-string-in-sql-server-reporting-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!