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-3c.脚本.部件框自绘(饼图与弧线)",
| "Author":"锐浪报表软件",
| "Description":"演示部件框的自定义绘制功能\r\n\r\n将部件框的“自绘”属性设为“是”,部件框将成为自绘部件框,其绘制输出将用用户自己通过调用 IGRGraphics 接口的方法来实现。绘制实现有两种方式;其一是在部件框的“绘制脚本”中写报表脚本实现;其二是响应报表的“ControlCustomDraw”事件写程序代码实现。\r\n\r\n调用部件框的“DrawDefault”方法可以将其本身绘出。\r\n",
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "GlobalScript":"function GetColorValue(r,g,b)\r\n{\r\n return Report.Utility.ColorFromRGB(r, g , b);\r\n}",
| "ConnectionString":"Provider=Microsoft.Jet.OLEDB.4.0;\r\nUser ID=Admin;\r\nData Source=C:\\Grid++Report 6\\Samples\\Data\\Northwind.mdb",
| "Printer":{
| "Oriention":"Landscape"
| },
| "ReportHeader":[
| {
| "Name":"ReportHeader1",
| "Height":13.8113,
| "Control":[
| {
| "Type":"StaticBox",
| "Name":"StaticBox1",
| "Left":14.949,
| "Top":0.9525,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"Arc"
| },
| {
| "Type":"StaticBox",
| "Name":"sbScriptDraw",
| "Left":14.949,
| "Top":1.50813,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height,\r\n cx = x + width/2,\r\n cy = y + height/2;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.Arc(cx, cy, height/2, 30, 270);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Text":"StaticBox2"
| },
| {
| "Type":"StaticBox",
| "Name":"sbEventDraw",
| "Left":7.69938,
| "Top":1.5875,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height,\r\n cx = x + width/2,\r\n cy = y + height/2;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.Pie(cx, cy, height/2, 30, 270, true);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Text":"StaticBox2"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox5",
| "Left":0.661458,
| "Top":1.56104,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height,\r\n cx = x + width/2,\r\n cy = y + height/2;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.Pie(cx, cy, height/2, 30, 270, false);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Font":{
| "Name":"宋体",
| "Size":157500,
| "Bold":true,
| "Charset":134
| },
| "TextAlign":"MiddleCenter"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox6",
| "Left":15.0283,
| "Top":6.13833,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.EllipseArc(x, y, width, height, 30, 270);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Text":"EllipseArc"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox7",
| "Left":0.608542,
| "Top":6.21771,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.EllipsePie(x, y, width, height, 30, 270, false);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Text":"StaticBox2"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox8",
| "Left":7.67292,
| "Top":6.16479,
| "Width":5.79438,
| "Height":3.59833,
| "CustomDraw":true,
| "CustomDrawScript":"var Graphics = Report.Graphics,\r\n x = Graphics.Left,\r\n y = Graphics.Top,\r\n width = Graphics.Width,\r\n height = Graphics.Height;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\nGraphics.EllipsePie(x, y, width, height, 30, 270, true);\r\n\r\n//恢复填充色设定,SelectFillColor调用之后,必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定,SelectPen调用之后,必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n",
| "Text":"StaticBox2"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox9",
| "Left":0.687917,
| "Top":1.00542,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"Pie(not fill)"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox10",
| "Left":7.67292,
| "Top":1.00542,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"Pie(fill)"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox11",
| "Left":15.0283,
| "Top":5.58271,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"EllipseArc"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox12",
| "Left":0.555625,
| "Top":5.63563,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"EllipsePie(not fill)"
| },
| {
| "Type":"StaticBox",
| "Name":"StaticBox13",
| "Left":7.67292,
| "Top":5.60917,
| "Width":5.82083,
| "Height":0.582083,
| "WordWrap":true,
| "TextAlign":"MiddleCenter",
| "Text":"EllipsePie(fill)"
| }
| ]
| }
| ]
| }
|
|