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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
{
    "Version":"6.8.5.0",
    "Title":"7-3e.脚本.自定义条件分组",
    "Author":"锐浪报表软件",
    "Description":"不是根据某一个或多个字段的值的变化产生分组,而是根据自定的规则产生分组,这里是根据值的范围产生不同的分组。",
    "Font":{
        "Name":"宋体",
        "Size":105000,
        "Weight":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ABgAAv/8AjvAABgAAAAAAAAAABgBf/v8L/P8ABgAA5v8A5v8A5v8A5v8A5v8ABgAA5v8AxP8ABgAAAAAAAAAAAAAABgCT//9f/v8L/P8ABgAA5v8A5v8A5v8ABgAA5v8AxP8AjvAABgAAAAAAAAAAAAAAAAAABgDP//+T//8L/P8L/P8A5v8A5v8A5v8AxP8AjvAABgAAAAAAAAAAAAAAAAAAAAAAAAAABgAABgDP//+T//9f/v9f/v8AxP8ABgAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAABgAABgAABgAABgAAAAAAAAAAAAAAAAAAAAD//////B////AH///gA///wAH//8AB//+AAP//gAD//4AA//+AAP//gAD//8AB///AAf//4AP///AH///8H///"
        }
    ],
    "DetailGrid":{
        "CenterView":true,
        "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 d.ProductID,p.ProductName,sum(d.UnitPrice*d.quantity) as amount\r\nfrom OrderDetails d inner join Products p on p.Productid=d.Productid\r\ngroup by d.ProductID,p.ProductName\r\norder by sum(d.UnitPrice*d.quantity) desc",
            "ProcessRecordScript":"var Amount = Report.FieldByName(\"Amount\").AsFloat;\r\nvar NewCatalog = FindCatalogByAmount(Amount);\r\nif (Report.ParameterByName(\"CurCatalogID\").AsInteger != NewCatalog)\r\n{\r\n    Report.DetailGrid.StartNewGroup(1);\r\n}\r\n\r\nfunction FindCatalogByAmount(Amount)\r\n{\r\n    var Catalog;\r\n    if (Amount < 5000)\r\n        Catalog = 1;\r\n    else if (Amount < 20000)\r\n        Catalog = 2;\r\n    else\r\n        Catalog = 3;\r\n    return Catalog;\r\n}\r\n",
            "Field":[
                {
                    "Name":"ProductID",
                    "Type":"Integer"
                },
                {
                    "Name":"ProductName"
                },
                {
                    "Name":"Amount",
                    "Type":"Float",
                    "Format":"#,##0.00"
                }
            ]
        },
        "Column":[
            {
                "Name":"ProductID",
                "Width":3.78354
            },
            {
                "Name":"ProductName",
                "Width":4.57729
            },
            {
                "Name":"Amount",
                "Width":4.39208
            }
        ],
        "ColumnContent":{
            "Height":0.582083,
            "ColumnContentCell":[
                {
                    "Column":"ProductID",
                    "DataField":"ProductID"
                },
                {
                    "Column":"ProductName",
                    "DataField":"ProductName"
                },
                {
                    "Column":"Amount",
                    "TextAlign":"MiddleRight",
                    "DataField":"Amount"
                }
            ]
        },
        "ColumnTitle":{
            "BackColor":"C0C0C0",
            "Height":0.79375,
            "RepeatStyle":"OnPage",
            "ColumnTitleCell":[
                {
                    "GroupTitle":false,
                    "Column":"ProductID",
                    "Text":"产品编号"
                },
                {
                    "GroupTitle":false,
                    "Column":"ProductName",
                    "Text":"产品名称"
                },
                {
                    "GroupTitle":false,
                    "Column":"Amount",
                    "Text":"销售金额"
                }
            ]
        },
        "Group":[
            {
                "Name":"Group1",
                "GroupBeginScript":"var Amount = Report.FieldByName(\"Amount\").AsFloat;\r\nvar CurCatalogID = FindCatalogByAmount(Amount);\r\nvar CurCatalogText;\r\nif (CurCatalogID == 1)\r\n    CurCatalogText = \"滞销\";\r\nelse if (CurCatalogID == 2)\r\n    CurCatalogText = \"一般\";\r\nelse\r\n    CurCatalogText = \"畅销\";\r\nReport.Parameters.Item(\"CurCatalogID\").AsInteger = CurCatalogID;\r\nReport.Parameters.Item(\"Catalog\").AsString = CurCatalogText;\r\n\r\nfunction FindCatalogByAmount(Amount)\r\n{\r\n    var Catalog;\r\n    if (Amount < 5000)\r\n        Catalog = 1;\r\n    else if (Amount < 20000)\r\n        Catalog = 2;\r\n    else\r\n        Catalog = 3;\r\n    return Catalog;\r\n}\r\n",
                "GroupHeader":{
                    "BackColor":"E1FFFF",
                    "Height":0.582083,
                    "Font":{
                        "Name":"宋体",
                        "Size":105000,
                        "Bold":true,
                        "Charset":134
                    },
                    "Control":[
                        {
                            "Type":"StaticBox",
                            "Name":"StaticBox3",
                            "BackColor":"FFFFFF",
                            "Left":0.185208,
                            "Width":1.61396,
                            "Height":0.582083,
                            "Text":"分类等级:"
                        },
                        {
                            "Type":"StaticBox",
                            "Name":"CatalogBox",
                            "Left":1.79917,
                            "Width":2.19604,
                            "Height":0.582083,
                            "Text":"StaticBox6",
                            "Parameter":"Catalog"
                        }
                    ]
                },
                "GroupFooter":{
                    "BackColor":"E1FFFF",
                    "Height":1.19063,
                    "FormatScript":"var GreenShapeBox = Report.ControlByName(\"GreenShapeBox\");\r\nvar YellowShapeBox = Report.ControlByName(\"YellowShapeBox\");\r\nvar RedShapeBox = Report.ControlByName(\"RedShapeBox\");\r\n\r\n//运行时按条件确定部件框的隐藏与显示\r\nGreenShapeBox.Visible = false;\r\nYellowShapeBox.Visible = false;\r\nRedShapeBox.Visible = false;\r\nvar Amount = Report.FieldByName(\"Amount\").AsFloat;\r\nvar CurCatalog = FindCatalogByAmount(Amount);\r\nif (CurCatalog == 1)\r\n{\r\n    RedShapeBox.Visible = true;\r\n    Report.ControlByName(\"PictureBox1\").AsPictureBox.ImageIndex = 3;\r\n}\r\nelse if (CurCatalog == 2)\r\n{\r\n    YellowShapeBox.Visible = true;\r\n    Report.ControlByName(\"PictureBox1\").AsPictureBox.ImageIndex = 2;\r\n}\r\nelse\r\n{\r\n    GreenShapeBox.Visible = true;\r\n    Report.ControlByName(\"PictureBox1\").AsPictureBox.ImageIndex = 1;\r\n}\r\n\r\r\nfunction FindCatalogByAmount(Amount)\r\n{\r\n    var Catalog;\r\n    if (Amount < 5000)\r\n        Catalog = 1;\r\n    else if (Amount < 20000)\r\n        Catalog = 2;\r\n    else\r\n        Catalog = 3;\r\n    return Catalog;\r\n}\r\n",
                    "Font":{
                        "Name":"宋体",
                        "Size":105000,
                        "Bold":true,
                        "Charset":134
                    },
                    "Control":[
                        {
                            "Type":"StaticBox",
                            "Name":"StaticBox4",
                            "BackColor":"FFFFFF",
                            "Left":1.79917,
                            "Width":1.61396,
                            "Height":0.582083,
                            "Text":"产品个数:"
                        },
                        {
                            "Type":"SummaryBox",
                            "Name":"Summary1",
                            "BackColor":"FFFFFF",
                            "Left":3.41313,
                            "Width":1.98438,
                            "Height":0.582083,
                            "SummaryFun":"Count"
                        },
                        {
                            "Type":"SummaryBox",
                            "Name":"Summary2",
                            "BackColor":"FFFFFF",
                            "AlignColumn":"Amount",
                            "Left":8.36083,
                            "Width":4.41854,
                            "Height":0.582083,
                            "TextAlign":"MiddleRight",
                            "DataField":"Amount"
                        },
                        {
                            "Type":"StaticBox",
                            "Name":"StaticBox5",
                            "BackColor":"FFFFFF",
                            "Left":6.19125,
                            "Width":2.19604,
                            "Height":0.582083,
                            "Text":"金额小计:"
                        },
                        {
                            "Type":"StaticBox",
                            "Name":"StaticBox6",
                            "Left":6.19125,
                            "Top":0.582083,
                            "Width":2.19604,
                            "Height":0.608542,
                            "Text":"金额平均:"
                        },
                        {
                            "Type":"SummaryBox",
                            "Name":"Summary3",
                            "AlignColumn":"Amount",
                            "Left":8.36083,
                            "Top":0.582083,
                            "Width":4.41854,
                            "Height":0.608542,
                            "TextAlign":"MiddleRight",
                            "DataField":"Amount",
                            "SummaryFun":"Avg"
                        },
                        {
                            "Type":"ShapeBox",
                            "Name":"GreenShapeBox",
                            "BackColor":"FFFFFF",
                            "Left":1.79917,
                            "Top":0.608542,
                            "Width":0.79375,
                            "Height":0.608542,
                            "Visible":false,
                            "ShapeType":"Circle",
                            "FillColor":"008000",
                            "FillStyle":"Normal"
                        },
                        {
                            "Type":"ShapeBox",
                            "Name":"YellowShapeBox",
                            "BackColor":"FFFFFF",
                            "Left":1.79917,
                            "Top":0.608542,
                            "Width":0.79375,
                            "Height":0.608542,
                            "Visible":false,
                            "ShapeType":"Circle",
                            "FillColor":"00FFFF",
                            "FillStyle":"Normal"
                        },
                        {
                            "Type":"ShapeBox",
                            "Name":"RedShapeBox",
                            "BackColor":"FFFFFF",
                            "Left":1.79917,
                            "Top":0.608542,
                            "Width":0.79375,
                            "Height":0.608542,
                            "ShapeType":"Circle",
                            "FillColor":"0000FF",
                            "FillStyle":"Normal"
                        },
                        {
                            "Type":"PictureBox",
                            "Name":"PictureBox1",
                            "Width":1.40229,
                            "Height":1.19063
                        }
                    ]
                }
            }
        ]
    },
    "PageHeader":{
        "Height":1.00542,
        "Control":[
            {
                "Type":"StaticBox",
                "Name":"StaticBox2",
                "Left":9.18104,
                "Top":0.185208,
                "Width":6.74688,
                "Height":0.555625,
                "Font":{
                    "Name":"隶书",
                    "Size":142500,
                    "Bold":true,
                    "Charset":134
                },
                "TextAlign":"MiddleRight",
                "Text":"北风公司销售管理系统报表"
            },
            {
                "Type":"Line",
                "Name":"Line1",
                "Top":0.79375,
                "Width":16.1925,
                "Pen":{
                    "Width":2
                }
            }
        ]
    },
    "PageFooter":{
        "Height":0.582083,
        "Control":[
            {
                "Type":"MemoBox",
                "Name":"MemoBox1",
                "AlignColumn":"Amount",
                "Left":8.36083,
                "Width":4.41854,
                "Height":0.396875,
                "TextAlign":"MiddleRight",
                "Text":"共[#SystemVar(PageCount)#]页 第[#SystemVar(PageNumber)#]页"
            }
        ]
    },
    "Parameter":[
        {
            "Name":"Catalog"
        },
        {
            "Name":"CurCatalogID",
            "DataType":"Integer",
            "Value":"1"
        }
    ],
    "ReportHeader":[
        {
            "Height":1.79917,
            "Control":[
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox1",
                    "Center":"Horizontal",
                    "Left":4.92125,
                    "Top":0.185208,
                    "Width":6.19125,
                    "Height":0.582083,
                    "Font":{
                        "Name":"宋体",
                        "Size":150000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"按产品销售汇总分类报表"
                },
                {
                    "Type":"StaticBox",
                    "Name":"SubTitle",
                    "Center":"Horizontal",
                    "Left":1.13771,
                    "Top":0.79375,
                    "Width":13.7319,
                    "Height":0.608542,
                    "Font":{
                        "Name":"宋体",
                        "Size":120000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"在记录集的 ProcessRecordScript 事件中根据条件产生分组"
                }
            ]
        }
    ],
    "ReportFooter":[
        {
            "Height":1.19063,
            "Font":{
                "Name":"宋体",
                "Size":105000,
                "Bold":true,
                "Charset":134
            },
            "Control":[
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox8",
                    "AlignColumnSide":"Right",
                    "AlignColumn":"ProductName",
                    "Left":6.00604,
                    "Width":2.38125,
                    "Height":0.582083,
                    "TextAlign":"MiddleRight",
                    "Text":"总金额:"
                },
                {
                    "Type":"SummaryBox",
                    "Name":"Summary5",
                    "AlignColumn":"Amount",
                    "Left":8.36083,
                    "Width":4.41854,
                    "Height":0.582083,
                    "TextAlign":"MiddleRight",
                    "DataField":"Amount"
                },
                {
                    "Type":"SummaryBox",
                    "Name":"Summary6",
                    "AlignColumn":"Amount",
                    "Left":8.36083,
                    "Top":0.582083,
                    "Width":4.41854,
                    "Height":0.608542,
                    "TextAlign":"MiddleRight",
                    "DataField":"Amount",
                    "SummaryFun":"Avg"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox9",
                    "AlignColumnSide":"Right",
                    "AlignColumn":"ProductName",
                    "Left":6.00604,
                    "Top":0.582083,
                    "Width":2.38125,
                    "Height":0.608542,
                    "TextAlign":"MiddleRight",
                    "Text":"平均金额:"
                },
                {
                    "Type":"MemoBox",
                    "Name":"MemoBox2",
                    "AlignColumn":"ProductID",
                    "Width":3.81,
                    "Height":0.608542,
                    "Text":"总产品个数:[#Count()#]"
                }
            ]
        }
    ]
}