坠入泡泡 发表于 2017-12-27 10:32:40

activereport的报表图例的问题

不知道这么效果能不能实现,根据值的大小 file:///C:\Users\Lenovo\AppData\Roaming\Tencent\Users\710716326\TIM\WinTemp\RichOle\FJS~X)JK]B_P0A~G8I64P7J.png改变外观的函数应该怎么写有没有可以那个大哥写过file:///C:\Users\Lenovo\AppData\Roaming\Tencent\Users\710716326\TIM\WinTemp\RichOle\FJS~X)JK]B_P0A~G8I64P7J.png


KearneyKang 发表于 2017-12-27 11:17:06

您好,您是要根据值的大小改变背景色的颜色设置,还是怎么的。如果是这样,您可以参考模板库的如下模板模板库的下载地址如下:http://www.grapecity.com.cn/enterprise-solutions/activereports_server/activity/
点击右边的编辑就可以看到报表的设计,然后有一个点击选中对应单元格,可以看到他的颜色设置函数,具体设置在脚本里


坠入泡泡 发表于 2017-12-27 13:38:19

我有个问题 就是=IIf( (2000= 2000, "Red", "Blue" )我怕这边可能是需要三个颜色怎么用iif

KearneyKang 发表于 2017-12-27 13:56:20

写脚本实现
参考如下博客:http://blog.gcpowertools.com.cn/post/%E5%8D%95%E5%85%83%E6%A0%BC%E6%88%96%E8%80%85%E6%96%87%E6%9C%AC%E6%A1%86%E7%9A%84%E8%83%8C%E6%99%AF%E8%89%B2%E8%AE%BE%E7%BD%AE.aspx

坠入泡泡 发表于 2017-12-27 14:15:45

KearneyKang 发表于 2017-12-27 13:56
写脚本实现
参考如下博客:http://blog.gcpowertools.com.cn/post/%E5%8D%95%E5%85%83%E6%A0%BC%E6%88%96% ...

Function GetColor(ByVal value As Double, ByVal limit As Double, ByVal larger As Double) As String
        If(value < limit) Then
                Return "Blue"
        ElseIf(value > larger) Then
                Return "Black"
        Else
                Return "Red"
        End If
End Function
=code.GetColor(5,4,6); 无效的表达式 是为什么?

KearneyKang 发表于 2017-12-27 16:20:05

您传了三个值,根本识别不了。您按着博客里的内容先操作
页: [1]
查看完整版本: activereport的报表图例的问题