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
| {
| "Version":"6.8.1.0",
| "Title":"8f.图表.日期时间轴",
| "Author":"锐浪报表软件",
| "Description":"图表轴按日期时间格式显示\r\n\r\n实现要点:\r\n1、设置X轴的“日期时间轴”属性\r\n2、设置X轴的“文字格式”属性\r\n3、序列中轴对应的字段类型应该是日期时间类型的",
| "Font":{
| "Name":"宋体",
| "Size":90000,
| "Weight":400,
| "Charset":134
| },
| "ProcessBeginScript":"//Chart2\r\n{\r\n var chart2 = Report.ControlByName(\"Chart2\");\r\n\r\n //设置 Chart2 的X轴的 Min、Max与Space属性。这几个属性值1表示一天\r\n //如果要分钟或秒表示的值,应该将其转换为天,即分钟数要除(24*60),秒数要除(24*60*60)\r\n chart2.XAxis.Min = Report.ParameterByName(\"BeginDate\").AsFloat;\r\n chart2.XAxis.Max = Report.ParameterByName(\"EndDate\").AsFloat;\r\n chart2.XAxis.Space = 5; //5天为步长单位。如果要以800分钟为步长单位,代码为chart2.XAxis.Space = 800/(24*60);\r\n\r\n //如果要按指定的日期时间值设置代码如下\r\n //var dt = Report.Utility.CreateDateTime();\r\n //dt.ValueFromDate(1997,6,1);\r\n //chart2.XAxis.Min = dt.AsFloat;\r\n //dt.ValueFromDate(1997,6,30);\r\n //chart2.XAxis.Max = dt.AsFloat;\r\n}\r\n\r\n\r\n\r\n//Chart3\r\n{\r\n //var chart3 = Report.ControlByName(\"Chart3\");\r\n //chart3.XAxis.Max = ...;\r\n}",
| "ConnectionString":"Provider=Microsoft.Jet.OLEDB.4.0;\r\nUser ID=Admin;\r\nData Source=..\\Data\\Northwind.mdb",
| "Printer":{
| "LeftMargin":1.5,
| "RightMargin":1.5
| },
| "DetailGrid":{
| "CenterView":true,
| "FixCols":1,
| "PageColumnDirection":"DownAcrossEqual",
| "PageColumnCount":2,
| "PrintAdaptMethod":"Discard",
| "ColLine":{
| "Color":"646F71"
| },
| "RowLine":{
| "Color":"646F71"
| },
| "Recordset":{
| "QuerySQL":"select t.CategoryName, m.OrderDate, sum(d.UnitPrice*d.Quantity) as Amount\r\nfrom (Orders m inner join OrderDetails d on m.OrderId=d.OrderId)\r\ninner join (Products p inner join Categories t on p.CategoryID=t.CategoryID) on p.ProductID=d.ProductID\r\nwhere m.OrderDate between :BeginDate and :EndDate and t.CategoryID<=3\r\ngroup by t.CategoryName, m.OrderDate\r\norder by t.CategoryName, m.OrderDate",
| "Field":[
| {
| "Name":"OrderDate",
| "Type":"DateTime",
| "Format":"yyyy/MM/dd"
| },
| {
| "Name":"Amount",
| "Type":"Currency",
| "Format":"#,##0.00;;#"
| },
| {
| "Name":"CategoryName"
| }
| ]
| },
| "Column":[
| {
| "Name":"CategoryName",
| "Width":2.67229
| },
| {
| "Name":"OrderDate",
| "Width":3.38667
| },
| {
| "Name":"Amount",
| "Width":2.51354
| }
| ],
| "ColumnContent":{
| "Height":0.608542,
| "ColumnContentCell":[
| {
| "Column":"CategoryName",
| "DataField":"CategoryName"
| },
| {
| "Column":"OrderDate",
| "DataField":"OrderDate"
| },
| {
| "Column":"Amount",
| "TextAlign":"MiddleRight",
| "DataField":"Amount"
| }
| ]
| },
| "ColumnTitle":{
| "Height":0.79375,
| "Font":{
| "Name":"宋体",
| "Size":90000,
| "Bold":true,
| "Charset":134
| },
| "RepeatStyle":"OnPageColumn",
| "ColumnTitleCell":[
| {
| "GroupTitle":false,
| "Column":"CategoryName",
| "TextAlign":"MiddleCenter",
| "Text":"产品"
| },
| {
| "GroupTitle":false,
| "Column":"OrderDate",
| "TextAlign":"MiddleCenter",
| "Text":"OrderDate"
| },
| {
| "GroupTitle":false,
| "Column":"Amount",
| "TextAlign":"MiddleCenter",
| "Text":"Amount"
| }
| ]
| }
| },
| "Parameter":[
| {
| "Name":"BeginDate",
| "DataType":"DateTime",
| "Value":"1997/6/1"
| },
| {
| "Name":"EndDate",
| "DataType":"DateTime",
| "Value":"1997/6/30"
| }
| ],
| "ReportFooter":[
| {
| "Name":"ReportFooter1",
| "Height":7.19667,
| "Control":[
| {
| "Type":"Chart",
| "Name":"Chart1",
| "Dock":"Fill",
| "Title":"Chart1:日期时间轴",
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "TitleFont":{
| "Name":"宋体",
| "Size":120000,
| "Bold":true,
| "Charset":134
| },
| "GroupCount":4,
| "SeriesCount":3,
| "BarWidthPercent":85,
| "SeriesField":"CategoryName",
| "Recordset":{
| "QuerySQL":"select t.CategoryName, m.OrderDate, sum(d.UnitPrice*d.Quantity) as Amount\r\nfrom (Orders m inner join OrderDetails d on m.OrderId=d.OrderId)\r\ninner join (Products p inner join Categories t on p.CategoryID=t.CategoryID) on p.ProductID=d.ProductID\r\nwhere m.OrderDate between :BeginDate and :EndDate and t.CategoryID<=3\r\ngroup by t.CategoryName, m.OrderDate\r\norder by t.CategoryName, m.OrderDate",
| "Field":[
| {
| "Name":"CategoryName"
| },
| {
| "Name":"OrderDate",
| "Type":"DateTime"
| },
| {
| "Name":"Amount",
| "Type":"Float"
| }
| ]
| },
| "XAxis":{
| "Label":"季度",
| "TextAngle":-30,
| "TextFormat":"MM/dd",
| "DateTimeAxis":true,
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "YAxis":{
| "Label":"销售额",
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "Y2Axis":{
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "ChartSeries":[
| {
| "ChartType":"XYCurveLineChart",
| "XValueField":"OrderDate",
| "YValueField":"Amount",
| "ValueFormat":"0.##",
| "TooltipText":"[#ChartVar(SeriesLabel)#]([#ChartVar(YVal)#], [#ChartVar(XVal)#])"
| }
| ]
| }
| ]
| },
| {
| "Name":"ReportFooter2",
| "Height":7.19667,
| "Control":[
| {
| "Type":"Chart",
| "Name":"Chart2",
| "Dock":"Fill",
| "Title":"Chart2:日期时间轴(脚本:Max, Min, Space)",
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "TitleFont":{
| "Name":"宋体",
| "Size":120000,
| "Bold":true,
| "Charset":134
| },
| "GroupCount":4,
| "SeriesCount":3,
| "BarWidthPercent":85,
| "SeriesField":"CategoryName",
| "Recordset":{
| "QuerySQL":"select t.CategoryName, m.OrderDate, sum(d.UnitPrice*d.Quantity) as Amount\r\nfrom (Orders m inner join OrderDetails d on m.OrderId=d.OrderId)\r\ninner join (Products p inner join Categories t on p.CategoryID=t.CategoryID) on p.ProductID=d.ProductID\r\nwhere m.OrderDate between :BeginDate and :EndDate and t.CategoryID<=3\r\ngroup by t.CategoryName, m.OrderDate\r\norder by t.CategoryName, m.OrderDate",
| "Field":[
| {
| "Name":"CategoryName"
| },
| {
| "Name":"OrderDate",
| "Type":"DateTime"
| },
| {
| "Name":"Amount",
| "Type":"Float"
| }
| ]
| },
| "XAxis":{
| "Label":"季度",
| "TextAngle":-30,
| "TextFormat":"MM/dd",
| "DateTimeAxis":true,
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "YAxis":{
| "Label":"销售额",
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "Y2Axis":{
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "ChartSeries":[
| {
| "ChartType":"XYCurveLineChart",
| "XValueField":"OrderDate",
| "YValueField":"Amount",
| "ValueFormat":"0.##",
| "TooltipText":"[#ChartVar(SeriesLabel)#]([#ChartVar(YVal)#], [#ChartVar(XVal)#])"
| }
| ]
| }
| ]
| },
| {
| "Name":"ReportFooter3",
| "Height":7.19667,
| "Control":[
| {
| "Type":"Chart",
| "Name":"Chart3",
| "Dock":"Fill",
| "Title":"Chart3:日期时间轴(最大值在标尺刻度)",
| "Font":{
| "Name":"宋体",
| "Size":105000,
| "Weight":400,
| "Charset":134
| },
| "TitleFont":{
| "Name":"宋体",
| "Size":120000,
| "Bold":true,
| "Charset":134
| },
| "GroupCount":4,
| "SeriesCount":3,
| "BarWidthPercent":85,
| "SeriesField":"CategoryName",
| "Recordset":{
| "QuerySQL":"select t.CategoryName, m.OrderDate, sum(d.UnitPrice*d.Quantity) as Amount\r\nfrom (Orders m inner join OrderDetails d on m.OrderId=d.OrderId)\r\ninner join (Products p inner join Categories t on p.CategoryID=t.CategoryID) on p.ProductID=d.ProductID\r\nwhere m.OrderDate between :BeginDate and :EndDate and t.CategoryID<=3\r\ngroup by t.CategoryName, m.OrderDate\r\norder by t.CategoryName, m.OrderDate",
| "Field":[
| {
| "Name":"CategoryName"
| },
| {
| "Name":"OrderDate",
| "Type":"DateTime"
| },
| {
| "Name":"Amount",
| "Type":"Float"
| }
| ]
| },
| "XAxis":{
| "Label":"季度",
| "TextAngle":-30,
| "TextFormat":"MM/dd",
| "DateTimeAxis":true,
| "MaxAtScale":true,
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "YAxis":{
| "Label":"销售额",
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "Y2Axis":{
| "TextFormat":"0.##",
| "CoordLinePen":{
| "Color":"FFC4C4"
| }
| },
| "ChartSeries":[
| {
| "ChartType":"XYCurveLineChart",
| "XValueField":"OrderDate",
| "YValueField":"Amount",
| "ValueFormat":"0.##",
| "TooltipText":"[#ChartVar(SeriesLabel)#]([#ChartVar(YVal)#], [#ChartVar(XVal)#])"
| }
| ]
| }
| ]
| }
| ]
| }
|
|