I am new to Reportnet - using Reportnet 1.1 MR3 with the SDK
I am trying to access a List report's output that has been saved as XML using 'classic' ASP. The end goal is to bring
the report output into the ASP script as XML for parsing and eventually to be consumed by another app.
From the documentation, I know this is possible(?) but I have not been able to find an example and am starting to bang my head against the wall.
Any ideas/suggestions would be appreciated.
The code I have been trying is:
<%
' Define SDK parameters
Dim crnPath
Dim oCRN
' Define application variables
Dim virtualDirectory
' Define call parameters
Dim props
Dim prpenum
Dim sort
Dim sortBy
Dim qop
Dim oBC
virtualDirectory = "crn"
' Define the target Cognos ReportNet server path
crnPath = " & virtualDirectory & "/cgi-bin/cognos.cgi"
Set oCRN = Server.CreateObject("CRN.CognosReportNetService")
oCRN.endPointUrl = crnPath
Set props = Server.CreateObject("CRN.PropEnumC")
Set prpenum = Server.CreateObject("CRN.propEnum")
Set sort = Server.CreateObject("CRN.sort")
Set sortBy = Server.CreateObject("CRN.SortC")
Set qop = Server.CreateObject("CRN.QueryOptions")
props.add prpenum.getIndex("defaultName")
props.add prpenum.getIndex("defaultOutputFormat")
sort.Order = ascending
sort.propName = prpenum.getIndex("defaultName")
sortBy.Add sort
dim strReportPath
strReportPath = "/content/package[@name='GO Sales and Retailers']/reportView[@name='Report View of foo_list_example']"
Set oBC = oCRN.query(strReportPath, props, sortBy, qop)
oBC = oCRN.query(strReportPath, props, sortBy, qop)
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument.3.0")
response.write ("<BR>debug -> oBC.count = " & oBC.count )
xmlDoc.LoadXML oBC.data 'Throws error
%>
I am trying to access a List report's output that has been saved as XML using 'classic' ASP. The end goal is to bring
the report output into the ASP script as XML for parsing and eventually to be consumed by another app.
From the documentation, I know this is possible(?) but I have not been able to find an example and am starting to bang my head against the wall.
Any ideas/suggestions would be appreciated.
The code I have been trying is:
<%
' Define SDK parameters
Dim crnPath
Dim oCRN
' Define application variables
Dim virtualDirectory
' Define call parameters
Dim props
Dim prpenum
Dim sort
Dim sortBy
Dim qop
Dim oBC
virtualDirectory = "crn"
' Define the target Cognos ReportNet server path
crnPath = " & virtualDirectory & "/cgi-bin/cognos.cgi"
Set oCRN = Server.CreateObject("CRN.CognosReportNetService")
oCRN.endPointUrl = crnPath
Set props = Server.CreateObject("CRN.PropEnumC")
Set prpenum = Server.CreateObject("CRN.propEnum")
Set sort = Server.CreateObject("CRN.sort")
Set sortBy = Server.CreateObject("CRN.SortC")
Set qop = Server.CreateObject("CRN.QueryOptions")
props.add prpenum.getIndex("defaultName")
props.add prpenum.getIndex("defaultOutputFormat")
sort.Order = ascending
sort.propName = prpenum.getIndex("defaultName")
sortBy.Add sort
dim strReportPath
strReportPath = "/content/package[@name='GO Sales and Retailers']/reportView[@name='Report View of foo_list_example']"
Set oBC = oCRN.query(strReportPath, props, sortBy, qop)
oBC = oCRN.query(strReportPath, props, sortBy, qop)
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument.3.0")
response.write ("<BR>debug -> oBC.count = " & oBC.count )
xmlDoc.LoadXML oBC.data 'Throws error
%>