我有一个SSRS报告,其中包含导出到Excel(XLSX)的列 . 它给出了一个错误,我似乎无法弄清楚如何修复 .
列值是以下表达式,例如:
=Code.GetUserDepartment(Lookup(Fields!idp.Value, Fields!ows_ID.Value,Fields!Person_ID.Value, "DataSetIdp"))
哪里
Public Function GetUserDepartment( personid as Integer) as String
Dim i as Integer
i = 0
For i = 1 to Report.Parameters!userDepartment.Count()
If Report.Parameters!userDepartment.Value(i) = personid then
GetUserDepartment = Report.Parameters!userDepartment.Label(i)
Exit For
End if
Next i
End Function
另一个领域有表达:
=Lookup(Fields!idp.Value, Fields!ows_ID.Value,Fields!Person.Value, "DataSetIdp")
在哪里[Fields!Person]计算字段:
=Right(Fields!ows_scPerson.Value,Len(Fields!ows_scPerson.Value)-(InStr(Fields!ows_scPerson.Value,"#")))
The error displayed in the XLSX file is:
Excel的公式栏中的值显示为#VALUE!
有没有什么办法解决这一问题 ?导出PDF,CSV,DOC格式时会显示相同的错误 . 在视图模式下,报告数据正确显示In the view mode, the report data is displayed correctly