Previous Topic

Next Topic

Book Contents

ASP basics for reports with graphics

To produce a custom report in the form of a graph, you must create an ASP that:

The following example shows these elements. Note that it also explicitly declares the variables that will be used, and clears the report object when done.

<%

Response.Expires = -1
Response.Buffer = TRUE

'Clear out the existing HTTP header information and
'change the HTTP header to reflect that an image is
'being passed (rather than HTML)
Response.Clear
Response.ContentType = "IMAGE/JPEG"

'Create the report object
set obj = Server.CreateObject("PFReportObj.PFRptObject")

'Initialize the graph
'(nAxisStyle is determined by the InForm application’s 'underlying charting tool)
obj.SetGraphDisplay nChartType, nAxisStyle, nSize, nSize

'Get an HTML image tag
strImage = obj.ImageHTML nSize, nSize

'Write the image to the browser
Response.Write(strImage)

set obj = nothing

%>

Send Feedback