loulijun2021
2022-07-02 d24862719714be5f76fb3dc81a3a3da8de4cc5a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{
    "Version":"6.8.5.0",
    "Title":"7-3a.脚本.自绘突出行线",
    "Author":"锐浪报表软件",
    "Description":"1、自由格\r\n2、设置部件框的“自绘”属性\r\n3、在部件框上写“自绘脚本”",
    "Font":{
        "Name":"宋体",
        "Size":90000,
        "Weight":400,
        "Charset":134
    },
    "GlobalScript":"function GetColorValue(r,g,b)\r\n{\r\n   return Report.Utility.ColorFromRGB(r, g , b);\r\n}\r\n",
    "Printer":{
    },
    "DetailGrid":{
        "CenterView":true,
        "ColLine":{
            "Color":"646F71"
        },
        "RowLine":{
            "Color":"646F71"
        },
        "Recordset":{
            "ConnectionString":"Provider=Microsoft.Jet.OLEDB.4.0;\r\nUser ID=Admin;\r\nData Source=C:\\Grid++Report 6\\Samples\\Data\\Northwind.mdb",
            "QuerySQL":"select m.CustomerId,c.CompanyName,sum(d.UnitPrice*d.Quantity) as Amount\r\nfrom (Orders m inner join OrderDetails d on m.OrderId=d.OrderId)\r\nleft join Customers c on c.CustomerID=m.CustomerID\r\nwhere m.OrderId<10375 and m.CustomerId<'H'\r\ngroup by m.CustomerId,c.CompanyName\r\norder by m.CustomerId",
            "Field":[
                {
                    "Name":"CustomerId"
                },
                {
                    "Name":"CompanyName"
                },
                {
                    "Name":"Amount",
                    "Type":"Currency",
                    "Format":"#,##0.00"
                }
            ]
        },
        "Column":[
            {
                "Name":"UnitPriceaaa",
                "Width":2.38125
            },
            {
                "Name":"UnitPrice",
                "Width":4.78896
            },
            {
                "Name":"DisCountAmt",
                "Width":3.41313
            }
        ],
        "ColumnContent":{
            "Height":0.608542,
            "ColumnContentCell":[
                {
                    "Column":"UnitPriceaaa",
                    "DataField":"CustomerId"
                },
                {
                    "Column":"UnitPrice",
                    "FreeCell":true,
                    "Control":[
                        {
                            "Type":"FieldBox",
                            "Name":"FieldBox1",
                            "Dock":"Fill",
                            "CustomDraw":true,
                            "CustomDrawScript":"var Graphics = Report.Graphics,\r\n    x1 = Graphics.Left,\r\n    x2 = x1 + Graphics.Width,\r\n    y = Graphics.Top + Graphics.Height - 1,\r\n    Amt = Report.FieldByName(\"Amount\").AsFloat;\r\n\r\nSender.DrawDefault();\r\n\r\nif (Amt > 3000)\r\n{\r\n  //设定绘出线型,GetColorValue 来自报表主队象的全局脚本属性中定义的函数\r\n  Graphics.SelectPen(2, GetColorValue(0, 0, 0), 0); //0=grpsSolid\r\n\r\n  Graphics.MoveTo(x1,  y);\r\n  Graphics.LineTo(x2,  y);\r\n\r\n  //恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\n  Graphics.RestorePen();\r\n}",
                            "DataField":"CompanyName"
                        }
                    ]
                },
                {
                    "Column":"DisCountAmt",
                    "FreeCell":true,
                    "Control":[
                        {
                            "Type":"FieldBox",
                            "Name":"FieldBox2",
                            "Dock":"Fill",
                            "CustomDraw":true,
                            "CustomDrawScript":"var Graphics = Report.Graphics,\r\n    x1 = Graphics.Left,\r\n    x2 = x1 + Graphics.Width,\r\n    y = Graphics.Top + Graphics.Height - 1,\r\n    Amt = Report.FieldByName(\"Amount\").AsFloat;\r\n\r\nSender.DrawDefault();\r\n\r\nif (Amt > 3000)\r\n{\r\n  //设定绘出线型,GetColorValue 来自报表主队象的全局脚本属性中定义的函数\r\n  Graphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n  Graphics.MoveTo(x1,  y);\r\n  Graphics.LineTo(x2,  y);\r\n\r\n  //恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\n  Graphics.RestorePen();\r\n}",
                            "TextAlign":"MiddleRight",
                            "DataField":"Amount"
                        }
                    ]
                }
            ]
        },
        "ColumnTitle":{
            "BackColor":"E2EFF1",
            "Height":0.608542,
            "RepeatStyle":"OnPage",
            "ColumnTitleCell":[
                {
                    "GroupTitle":false,
                    "Column":"UnitPriceaaa",
                    "BackColor":"FFFFFF",
                    "Font":{
                        "Name":"宋体",
                        "Size":90000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"客户编号"
                },
                {
                    "GroupTitle":false,
                    "Column":"UnitPrice",
                    "BackColor":"FFFFFF",
                    "Font":{
                        "Name":"宋体",
                        "Size":90000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"客户名称"
                },
                {
                    "GroupTitle":false,
                    "Column":"DisCountAmt",
                    "BackColor":"FFFFFF",
                    "Font":{
                        "Name":"宋体",
                        "Size":90000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"金额"
                }
            ]
        }
    },
    "ReportHeader":[
        {
            "Height":1.40229,
            "Control":[
                {
                    "Type":"StaticBox",
                    "Name":"TitleBox",
                    "Center":"Horizontal",
                    "Left":5.18583,
                    "Top":0.396875,
                    "Width":5.63563,
                    "Height":0.582083,
                    "Font":{
                        "Name":"宋体",
                        "Size":150000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"按条件加粗行线"
                }
            ]
        }
    ]
}