ASP basics for text reports
To produce a custom text report, an ASP must:
- Create a report object.
- Specify an SQL query to extract information from a database.
- Set the SQL statement as the value of the Command property of the Reporting COM object.
The following example shows a working ASP that contains all of these elements and clears the report object when done:
<%
'Create the report object
set obj = Server.CreateObject(“PFReportObj.PFRptObject”)
'Define an SQL statement
str = "SELECT DCV_PatientState.PATIENTID, "&_
"PF_SITE.SITEMNEMONIC, "&_
"PF_REVISIONHISTORY.PFTIMESTAMP FROM "&_
"DCV_PatientState, "&_
"PF_REVISIONHISTORY, DCV_SITE PF_SITE "&_
"WHERE DCV_PatientState.PATIENTID = "&_
"PF_REVISIONHISTORY.DBUID "&_
"AND DCV_PatientState.PATIENTREVISIONNUMBER = "&_
"PF_REVISIONHISTORY.REVISIONNUMBER "&_
"AND DCV_PatientState.SITEID = PF_SITE.SITEID"
%>