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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
| {
| "Version":"6.8.5.0",
| "Title":"4a.演示子报表",
| "Author":"锐浪报表软件",
| "Description":"演示子报表的使用\r\n\r\n在报表头与报表尾中插入子报表。一般需要将容纳子报表的报表节设置为可伸展,以便完整显示出子报表的内容。\r\n\r\n子报表在运行时需要关联一个报表对象,以便在子报表占据的空间将此关联报表的内容显示出来。可以通过子报表的“报表文件”属性指定报表模板文件名来关联报表,这样我们可以在设计报表时就预览子报表的显示效果。也可以通过运行时属性“Report”在程序中指定关联的报表对象,请参考例子程序“SubReport”。\r\n\r\n含有子报表的报表,其WEB报表对应的的 XML 与 JSON 数据应该定义多记录集数据包,更详细说明请参考帮助“WEB报表(B/S报表)->WEB报表数据”中的说明。 ",
| "Font":{
| "Name":"宋体",
| "Size":90000,
| "Weight":400,
| "Charset":134
| },
| "ConnectionString":"Provider=Microsoft.Jet.OLEDB.4.0;\r\nUser ID=Admin;\r\nData Source=C:\\Grid++Report 6\\Samples\\Data\\Northwind.mdb",
| "Printer":{
| "TopMargin":1.5,
| "BottomMargin":1.5
| },
| "PageHeader":{
| "Height":1.32292,
| "Control":[
| {
| "Type":"MemoBox",
| "Name":"MemoBox1",
| "Anchor":"[Top|Right]",
| "Left":2.19604,
| "Top":0.396875,
| "Width":13.7054,
| "Height":0.47625,
| "Font":{
| "Name":"楷体",
| "Size":120000,
| "Bold":true,
| "Charset":134
| },
| "Text":"欢迎访问Grid++Report网站www.rubylong.cn,了解最新产品信息。"
| },
| {
| "Type":"Line",
| "Name":"Line1",
| "Anchor":"[Left|Top|Right]",
| "Top":1.00542,
| "Width":16.0073,
| "Pen":{
| "Width":2
| }
| }
| ]
| },
| "PageFooter":{
| "Height":1.32292,
| "Control":[
| {
| "Type":"MemoBox",
| "Name":"MemoBox2",
| "Anchor":"[Top|Right]",
| "Left":13.2027,
| "Top":0.396875,
| "Width":2.59292,
| "Height":0.608542,
| "Text":"第[#SystemVar(PageNumber)#]页 共[#SystemVar(PageCount)#]页"
| },
| {
| "Type":"MemoBox",
| "Name":"MemoBox3",
| "Left":0.211667,
| "Top":0.396875,
| "Width":6.19125,
| "Height":0.608542,
| "Text":"打印时间:[#SystemVar(CurrentDateTime):yyyy年MM月dd日 HH:mm:ss#]"
| }
| ]
| },
| "ReportHeader":[
| {
| "Name":"ReportHeader1",
| "CanGrow":true,
| "Height":3.41313,
| "Control":[
| {
| "Type":"SubReport",
| "Name":"srCustomerList",
| "Dock":"Fill",
| "Report":{
| "Version":"6.8.5.0",
| "Title":"Grid++Report",
| "PrintAsDesignPaper":false,
| "Font":{
| "Name":"宋体",
| "Size":90000,
| "Weight":400,
| "Charset":134
| },
| "Printer":{
| "TopMargin":1.5,
| "BottomMargin":1.5
| },
| "DetailGrid":{
| "CenterView":true,
| "PrintAdaptMethod":"ResizeToFit",
| "Recordset":{
| "QuerySQL":"select * from Customers\r\norder by Region,City",
| "Field":[
| {
| "Name":"客户编号",
| "DBFieldName":"CustomerID"
| },
| {
| "Name":"公司名称",
| "DBFieldName":"CompanyName"
| },
| {
| "Name":"联系人",
| "DBFieldName":"ContactName"
| },
| {
| "Name":"联系人称谓",
| "DBFieldName":"ContactTitle"
| },
| {
| "Name":"地址",
| "DBFieldName":"Address"
| },
| {
| "Name":"城市",
| "DBFieldName":"City"
| },
| {
| "Name":"地区",
| "DBFieldName":"Region"
| },
| {
| "Name":"邮编",
| "DBFieldName":"PostalCode"
| },
| {
| "Name":"国家",
| "DBFieldName":"Country"
| },
| {
| "Name":"电话",
| "DBFieldName":"Phone"
| },
| {
| "Name":"传真",
| "DBFieldName":"Fax"
| }
| ]
| },
| "Column":[
| {
| "Name":"CustomerID",
| "Width":2.38125
| },
| {
| "Name":"CompanyName",
| "Width":3.175
| },
| {
| "Name":"Address",
| "Width":3.41313
| },
| {
| "Name":"City",
| "Width":1.5875
| },
| {
| "Name":"Region",
| "Width":1.98438
| },
| {
| "Name":"Phone",
| "Width":3.46604
| }
| ],
| "ColumnContent":{
| "Height":0.79375,
| "ColumnContentCell":[
| {
| "Column":"CustomerID",
| "DataField":"客户编号"
| },
| {
| "Column":"CompanyName",
| "DataField":"公司名称"
| },
| {
| "Column":"Address",
| "DataField":"地址"
| },
| {
| "Column":"City",
| "DataField":"城市"
| },
| {
| "Column":"Region",
| "DataField":"地区"
| },
| {
| "Column":"Phone",
| "DataField":"电话"
| }
| ]
| },
| "ColumnTitle":{
| "BackColor":"C0C0C0",
| "Height":0.79375,
| "Font":{
| "Name":"宋体",
| "Size":90000,
| "Bold":true,
| "Charset":134
| },
| "RepeatStyle":"OnPage",
| "ColumnTitleCell":[
| {
| "GroupTitle":false,
| "Column":"CustomerID",
| "BackColor":"FFFFFF",
| "Text":"客户编号"
| },
| {
| "GroupTitle":false,
| "Column":"CompanyName",
| "BackColor":"FFFFFF",
| "Text":"公司名称"
| },
| {
| "GroupTitle":false,
| "Column":"Address",
| "BackColor":"FFFFFF",
| "Text":"地址"
| },
| {
| "GroupTitle":false,
| "Column":"City",
| "BackColor":"FFFFFF",
| "Text":"城市"
| },
| {
| "GroupTitle":false,
| "Column":"Region",
| "BackColor":"FFFFFF",
| "Text":"地区"
| },
| {
| "GroupTitle":false,
| "Column":"Phone",
| "BackColor":"FFFFFF",
| "Text":"电话"
| }
| ]
| }
| },
| "Parameter":[
| {
| "Name":"Comment",
| "Value":"演示子报表的使用\r\n\r\n在报表头与报表尾中插入子报表。一般需要将容纳子报表的报表节设置为可伸展,以便完整显示出子报表的内容。\r\n\r\n子报表在运行时需要关联一个报表对象,以便在子报表占据的空间将此关联报表的内容显示出来。可以通过子报表的“报表文件”属性指定报表模板文件名来关联报表,这样我们可以在设计报表时就预览子报表的显示效果。也可以通过运行时属性“Report”在程序中指定关联的报表对象,请参考例子程序“SubReport”。"
| }
| ],
| "ReportHeader":[
| {
| "Height":0.978958,
| "Control":[
| {
| "Type":"StaticBox",
| "Name":"StaticBox1",
| "Center":"Horizontal",
| "Left":6.29708,
| "Top":0.185208,
| "Width":3.41313,
| "Height":0.582083,
| "Font":{
| "Name":"宋体",
| "Size":150000,
| "Bold":true,
| "Charset":134
| },
| "Text":"客户基本信息"
| }
| ]
| }
| ]
| }
| }
| ]
| },
| {
| "Name":"ReportHeader2",
| "CanGrow":true,
| "Height":2.98979,
| "Control":[
| {
| "Type":"SubReport",
| "Name":"srProductList",
| "Dock":"Fill",
| "Report":{
| "Version":"6.8.5.0",
| "Title":"Grid++Report",
| "PrintAsDesignPaper":false,
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "Printer":{
| },
| "DetailGrid":{
| "CenterView":true,
| "Recordset":{
| "QuerySQL":"select * from Products\r\norder by ProductName",
| "Field":[
| {
| "Name":"ProductID",
| "Type":"Integer"
| },
| {
| "Name":"ProductName"
| },
| {
| "Name":"SupplierID",
| "Type":"Integer"
| },
| {
| "Name":"CategoryID",
| "Type":"Integer"
| },
| {
| "Name":"QuantityPerUnit"
| },
| {
| "Name":"UnitPrice",
| "Type":"Currency",
| "Format":"#,##0.00"
| },
| {
| "Name":"UnitsInStock",
| "Type":"Integer",
| "Format":"#,##0"
| },
| {
| "Name":"UnitsOnOrder",
| "Type":"Integer",
| "Format":"#,##0"
| },
| {
| "Name":"ReorderLevel",
| "Type":"Integer"
| },
| {
| "Name":"Discontinued",
| "Type":"Boolean",
| "Format":"是:否"
| }
| ]
| },
| "Column":[
| {
| "Name":"ProductID",
| "Width":2.19604
| },
| {
| "Name":"ProductName",
| "Width":3.20146
| },
| {
| "Name":"UnitPrice",
| "Width":2.19604
| },
| {
| "Name":"UnitsInStock",
| "Width":2.40771
| },
| {
| "Name":"UnitsOnOrder",
| "Width":2
| },
| {
| "Name":"ReorderLevel",
| "Width":2
| },
| {
| "Name":"Discontinued",
| "Width":2
| }
| ],
| "ColumnContent":{
| "ColumnContentCell":[
| {
| "Column":"ProductID",
| "TextAlign":"MiddleRight",
| "DataField":"ProductID"
| },
| {
| "Column":"ProductName",
| "DataField":"ProductName"
| },
| {
| "Column":"UnitPrice",
| "TextAlign":"MiddleRight",
| "DataField":"UnitPrice"
| },
| {
| "Column":"UnitsInStock",
| "TextAlign":"MiddleRight",
| "DataField":"UnitsInStock"
| },
| {
| "Column":"UnitsOnOrder",
| "TextAlign":"MiddleRight",
| "DataField":"UnitsOnOrder"
| },
| {
| "Column":"ReorderLevel",
| "TextAlign":"MiddleCenter",
| "DataField":"ReorderLevel"
| },
| {
| "Column":"Discontinued",
| "TextAlign":"MiddleCenter",
| "DataField":"Discontinued"
| }
| ]
| },
| "ColumnTitle":{
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Bold":true,
| "Charset":134
| },
| "ColumnTitleCell":[
| {
| "GroupTitle":false,
| "Column":"ProductID",
| "TextAlign":"MiddleCenter",
| "Text":"编号"
| },
| {
| "GroupTitle":false,
| "Column":"ProductName",
| "TextAlign":"MiddleCenter",
| "Text":"名称"
| },
| {
| "GroupTitle":false,
| "Column":"UnitPrice",
| "TextAlign":"MiddleCenter",
| "Text":"单价"
| },
| {
| "GroupTitle":false,
| "Column":"UnitsInStock",
| "TextAlign":"MiddleCenter",
| "Text":"库存数量"
| },
| {
| "GroupTitle":false,
| "Column":"UnitsOnOrder",
| "TextAlign":"MiddleCenter",
| "Text":"定购数量"
| },
| {
| "GroupTitle":false,
| "Column":"ReorderLevel",
| "TextAlign":"MiddleCenter",
| "Text":"订购级别"
| },
| {
| "GroupTitle":false,
| "Column":"Discontinued",
| "TextAlign":"MiddleCenter",
| "Text":"使用中"
| }
| ]
| }
| },
| "ReportHeader":[
| {
| "Name":"ReportHeader1",
| "Height":1.40229,
| "Control":[
| {
| "Type":"StaticBox",
| "Name":"MainTitleBox",
| "Center":"Horizontal",
| "Left":5.02708,
| "Top":0.3,
| "Width":6,
| "Height":0.9,
| "Font":{
| "Name":"宋体",
| "Size":157500,
| "Bold":true,
| "Charset":134
| },
| "TextAlign":"MiddleCenter",
| "Text":"产品列表"
| }
| ]
| }
| ]
| }
| }
| ]
| }
| ],
| "ReportFooter":[
| {
| "Name":"ReportFooter1",
| "CanGrow":true,
| "Height":4.60375,
| "Control":[
| {
| "Type":"MemoBox",
| "Name":"MemoBox4",
| "BackColor":"FFFF00",
| "BackStyle":"Normal",
| "Left":0.211667,
| "Top":0.211667,
| "Width":7.59354,
| "Height":0.582083,
| "Font":{
| "Name":"宋体",
| "Size":142500,
| "Bold":true,
| "Charset":134
| },
| "Text":"最畅销产品"
| },
| {
| "Type":"SubReport",
| "Name":"srTop10Product",
| "Left":0.211667,
| "Top":0.79375,
| "Width":7.59354,
| "Height":3.59833,
| "Report":{
| "Version":"6.8.5.0",
| "Title":"Grid++Report",
| "PrintAsDesignPaper":false,
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "Printer":{
| },
| "DetailGrid":{
| "CenterView":true,
| "PrintAdaptMethod":"ResizeToFit",
| "Recordset":{
| "QuerySQL":"select top 10 p.ProductID, p.ProductName, sum(o.Quantity*o.UnitPrice) As SumQty\r\nfrom OrderDetails o, Products p\r\nwhere o.ProductID=p.ProductID\r\ngroup by p.ProductID, p.ProductName\r\norder by sum(Quantity*o.UnitPrice) desc",
| "Field":[
| {
| "Name":"RowNo",
| "Type":"Integer"
| },
| {
| "Name":"ProductID",
| "Type":"Integer",
| "Format":",000"
| },
| {
| "Name":"ProductName"
| },
| {
| "Name":"SumQty",
| "Type":"Float"
| }
| ]
| },
| "Column":[
| {
| "Name":"RowNo",
| "Width":1.19063
| },
| {
| "Name":"ProductID",
| "Width":1.79917
| },
| {
| "Name":"ProductName",
| "Width":2.40771
| },
| {
| "Name":"SumQty",
| "Width":2
| }
| ],
| "ColumnContent":{
| "ColumnContentCell":[
| {
| "Column":"RowNo",
| "FreeCell":true,
| "Control":[
| {
| "Type":"SystemVarBox",
| "Name":"SystemVarBox1",
| "Dock":"Fill",
| "SystemVar":"RowNo"
| }
| ]
| },
| {
| "Column":"ProductID",
| "DataField":"ProductID"
| },
| {
| "Column":"ProductName",
| "DataField":"ProductName"
| },
| {
| "Column":"SumQty",
| "TextAlign":"MiddleRight",
| "DataField":"SumQty"
| }
| ]
| },
| "ColumnTitle":{
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Bold":true,
| "Charset":134
| },
| "ColumnTitleCell":[
| {
| "GroupTitle":false,
| "Column":"RowNo",
| "TextAlign":"MiddleCenter",
| "Text":"序号"
| },
| {
| "GroupTitle":false,
| "Column":"ProductID",
| "TextAlign":"MiddleCenter",
| "Text":"产品编号"
| },
| {
| "GroupTitle":false,
| "Column":"ProductName",
| "TextAlign":"MiddleCenter",
| "Text":"产品名称"
| },
| {
| "GroupTitle":false,
| "Column":"SumQty",
| "TextAlign":"MiddleCenter",
| "Text":"销售数量"
| }
| ]
| }
| }
| }
| },
| {
| "Type":"MemoBox",
| "Name":"MemoBox5",
| "BackColor":"FFFF00",
| "BackStyle":"Normal",
| "Left":7.99042,
| "Top":0.211667,
| "Width":7.80521,
| "Height":0.582083,
| "Font":{
| "Name":"宋体",
| "Size":142500,
| "Bold":true,
| "Charset":134
| },
| "Text":"最有价值客户"
| },
| {
| "Type":"SubReport",
| "Name":"srTop10Customer",
| "Left":7.99042,
| "Top":0.79375,
| "Width":7.80521,
| "Height":3.59833,
| "Report":{
| "Version":"6.8.5.0",
| "Title":"Grid++Report",
| "PrintAsDesignPaper":false,
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "Printer":{
| },
| "DetailGrid":{
| "CenterView":true,
| "PrintAdaptMethod":"ResizeToFit",
| "Recordset":{
| "QuerySQL":"select top 10 c.CustomerID, c.CompanyName, sum(o.Quantity*o.UnitPrice) As SumAmt\r\nfrom OrderDetails o, Orders m, customers c\r\nwhere o.OrderID=m.OrderID and m.CustomerID=c.CustomerID\r\ngroup by c.CustomerID, c.CompanyName\r\norder by sum(o.Quantity*o.UnitPrice) desc",
| "Field":[
| {
| "Name":"RowNo",
| "Type":"Integer"
| },
| {
| "Name":"CustomerID"
| },
| {
| "Name":"CompanyName"
| },
| {
| "Name":"SumAmt",
| "Type":"Currency",
| "Format":"$#,##0.00"
| }
| ]
| },
| "Column":[
| {
| "Name":"CustomerID",
| "Width":1.79917
| },
| {
| "Name":"CompanyName",
| "Width":2.19604
| },
| {
| "Name":"SumAmt",
| "Width":2.40771
| },
| {
| "Name":"RowNo",
| "Width":1.00542
| }
| ],
| "ColumnContent":{
| "ColumnContentCell":[
| {
| "Column":"CustomerID",
| "DataField":"CustomerID"
| },
| {
| "Column":"CompanyName",
| "DataField":"CompanyName"
| },
| {
| "Column":"SumAmt",
| "TextAlign":"MiddleRight",
| "DataField":"SumAmt"
| },
| {
| "Column":"RowNo",
| "FreeCell":true,
| "Control":[
| {
| "Type":"SystemVarBox",
| "Name":"SystemVarBox1",
| "Dock":"Fill",
| "SystemVar":"RowNo"
| }
| ]
| }
| ]
| },
| "ColumnTitle":{
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Bold":true,
| "Charset":134
| },
| "ColumnTitleCell":[
| {
| "GroupTitle":false,
| "Column":"RowNo",
| "Text":"序号"
| },
| {
| "GroupTitle":false,
| "Column":"CustomerID",
| "TextAlign":"MiddleCenter",
| "Text":"客户编号"
| },
| {
| "GroupTitle":false,
| "Column":"CompanyName",
| "TextAlign":"MiddleCenter",
| "Text":"公司名称"
| },
| {
| "GroupTitle":false,
| "Column":"SumAmt",
| "TextAlign":"MiddleCenter",
| "Text":"销售总金额"
| }
| ]
| }
| }
| }
| }
| ]
| }
| ]
| }
|
|