Autodesk 15606-011408-9300 Developer Guide - Page 86

Overview, How Reports Are Generated, Specifying the Report Script,

Page 86 highlights

Overview When creating a map, you can add reports to the map. Typically, a report is an HTML page that displays information about the selected map features on the layer. However, because the power behind the report is a report script that you create using a third-party tool like ColdFusion, Active Server Pages (ASP), Java, LiveWire™, or dbWeb™, the report can do much more than display information-it can perform any number of tasks that you can code into the script. For example, in this chapter you will see a sample application that allows the user to click a point on the map and then updates the source database with that point, so that any map layer that uses that database as its data source will now display that point on the map. This chapter focuses on these types of advanced applications performed by the report script. How Reports Are Generated The role of Autodesk MapGuide in generating reports is to construct a URL dynamically and send it as an HTTP request to a Web server. This URL is composed of a path to an application on the Web server along with a set of parameters. The server, in turn, will process the request and send (or post) the results. Autodesk MapGuide can generate two distinct types of requests by passing unique parameters, along with the URL, to the server. The first type of URL request passes key values of the selected map features. These key values are the keys that are defined in the data source. The second type of URL request passes a point feature and its location. Specifying the Report Script The report script contains the necessary code to connect to the appropriate database, build the query, and display the results. For example, the script might be a ColdFusion template file (CFM) or Active Server Page (ASP) that resides on the Web server. The Reports tab in the Map Window Properties dialog box in Autodesk MapGuide Author allows you to specify the report script, as well as set other properties of the report. In the URL text box, you specify the name and path of the script you want to use to pass the report information to your reporting engine. 86 | Chapter 6 Using Reports to Query and Update Data Sources

  • 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

86
|
Chapter 6
Using Reports to Query and Update Data Sources
Overview
When creating a map, you can add
reports
to the map. Typically, a report is
an HTML page that displays information about the selected map features on
the layer. However, because the power behind the report is a report script
that you create using a third-party tool like ColdFusion, Active Server Pages
(ASP), Java, LiveWire
, or dbWeb
, the report can do much more than
display information
it can perform any number of tasks that you can code
into the script. For example, in this chapter you will see a sample application
that allows the user to click a point on the map and then updates the source
database with that point, so that any map layer that uses that database as its
data source will now display that point on the map. This chapter focuses on
these types of advanced applications performed by the report script.
How Reports Are Generated
The role of Autodesk MapGuide in generating reports is to construct a URL
dynamically and send it as an HTTP request to a Web server. This URL is
composed of a path to an application on the Web server along with a set of
parameters. The server, in turn, will process the request and send (or post
)
the results.
Autodesk MapGuide can generate two distinct types of requests by passing
unique parameters, along with the URL, to the server. The first type of URL
request passes key values of the selected map features. These key values are
the
keys
that are defined in the data source. The second type of URL request
passes a point feature and its location.
Specifying the Report Script
The report script contains the necessary code to connect to the appropriate
database, build the query, and display the results. For example, the script
might be a ColdFusion template file (CFM) or Active Server Page (ASP) that
resides on the Web server. The Reports tab in the Map Window Properties
dialog box in Autodesk MapGuide Author allows you to specify the report
script, as well as set other properties of the report. In the URL text box, you
specify the name and path of the script you want to use to pass the report
information to your reporting engine.