我已经尝试但在报告中没有效果所以请帮助我......
报告 --> 报告属性 --> 代码
Public Function GetColor(ByVal st as String,ByVal billamt as String,ByVal paidamt as String) As String
Dim retVal as String = ""
If(st = "Paid" & paidamt != "0" & paidamt < billamt )
retVal = "Blue"
Else If (st = "Unpaid")
retVal = "Red"
Else
retVal = "Black"
End If
Return retVal
End Function
占位符属性--->字体-->颜色
=Code.GetColor(Fields!estatus.Value,Fields!billamt.Value,Fields!paidamt.Value)
我也尝试过占位符属性--->字体->颜色
=IIf((Fields!paidamt.Value ="0") , "Red" ,
IIf(( Fields!paidamt.Value < Fields!billamt.Value ), "Blue" , "Black"))
但某些值不会更改颜色,例如 biillamount 140 Rs 和 Paidamount 40 Rs 但不会更改此类型的颜色值