HIdden表达式具有无效的输入字符串

时间:2013-04-15 16:42:46

标签: reporting-services

出错:tablix Group23的隐藏表达式包含错误,输入字符串格式不正确

我没有提出这个问题,并且对这个地方不熟悉并且必须解决所有问题 这是隐藏的表达

="Your screening results..." +VBCRLF+VBCRLF+"•  Your Body Weight was :" & (Fields!weight_loss.Value) & "lbs" 
+ VBCRLF+ "•  Your Body Mass Index (BMI) , which is based on your height and weight, was:" & (Fields!bmi.Value)& " " & "[Healthy Range: 18.5-24.9]"
+VBCRLF+ "•  Your waist circumference was:" & (Fields!waist.Value) & "inches." & "[Healthy Range:]" &IIF(Fields!gender.Value="M",35,40)
+ VBCRLF+ "•  To be in the healthy BMI range , your recommended weightshould be between " & (Fields!goal_wt_low.Value) & "and" &(Fields!goal_wt_high.Value) & "lbs." & "You told us that.." +VBCRLF+VBCRLF+
"• With regard to weight loss," & IIF(Fields!weight_loss.Value=1,"you are satisfied with the way you are now and have no desire to change.", IIF(Fields!weight_loss.Value=2,"•  you have considered making healthier choices."
, IIF(Fields!weight_loss.Value=3,"you have seriously considered making healthier choices and are ready to make a change.",IIF(Fields!weight_loss.Value=4,"you have started making healthier choices."
,IIF(fields!weight_loss.Value=5,"you have already made changes for a healthier lifestyle and are trying to maintain them.",IIF(Fields!weight_loss.Value=99,"you are not sure how satisfied you are with your current body weight.",nothing))))))

2 个答案:

答案 0 :(得分:2)

虽然这是很多数据,但我认为问题可能非常简单。我打赌其中一种数据类型不是数据库中的字符串类型或varchar / nvarchar。它基本上是在说:“在你施放它之前我不能添加一个带有数字的字符串。”

我猜你只需要在Fields.(thing).Value表达式周围添加CSTR()以将它们转换为字符串。如果它在此之后还在轰炸,我会一次尝试一件并删除第一个表达式之后的所有内容。

答案 1 :(得分:0)

我猜测字符串值不是隐藏表达式所需的布尔响应。隐藏有2个可接受的答案,正确和错误。字符串表达式永远不会计算为布尔响应。