<%@ Language=VBScript %>
<% Option Explicit
%>
<HTML>
<HEAD>
<title>Reports MetaData Sample</title>
<link rel="stylesheet" type="text/css" href="rsc/style/template_style.css"/>
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#5F5F5F;
text-decoration:none;
scrollbar-arrow-color:#003366;
scrollbar-base-color:#C0C0C0;
scrollbar-darkshadow-color:#6699cc;
scrollbar-face-color:#6699cc;
scrollbar-highlight-color:;
scrollbar-shadow-color:;
}
table {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#5F5F5F;
text-decoration:none;
}
td {
vertical-align:top;
}
.dropdown {
font-size:11px;
}
.marginTable {
margin-left: 10px;
margin-right: 10px;
}
.heading {
font-size:18px;
font-weight:700;
text-align:center;
color:#003366;
}
.leftnav {
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:12px;
color:white;
text-decoration:none;
}
a:hover.leftnav {
text-decoration:underline;
}
.leftnavHeading {
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:12px;
text-align:center;
background-color:#99ccff;
color:#003366;
text-decoration:none;
}
a:hover.leftnavHeading {
text-decoration:underline;
}
.leftnavHeadingLeftAlign {
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:12px;
text-align:Left;
/*background-color:#99ccff; */
color:#003366;
text-decoration:none;
}
.tableHeading {
font-weight:700;
color:#003366;
font-size:14px;
}
.tableHeadingGreen {
font-weight:700;
color:green;
font-size:14px;
}
.tableHeadingLeft {
font-weight:700;
text-align:left;
}
.tableHeadingLink {
font-weight:700;
color:#5F5F5F;
text-align:center;
text-decoration:none;
}
a:hover.tableHeadingLink {
font-weight:700;
color:#5F5F5F;
text-align:center;
text-decoration:underline;
}
.tableLink {
font-weight:200;
font-size:14px;
color:#003366;
text-align:left;
text-decoration:none;
}
a:hover.tableLink {
font-weight:200;
color:#6699cc;
text-align:left;
text-decoration:underline;
}
.navigationPage {
font-size:14px;
font-weight:700;
text-align:left;
color:#003366;
text-decoration:none;
}
a:hover.navigationPage {
font-size:14px;
font-weight:700;
text-align:left;
color:#6699cc;
text-decoration:underline;
}
.emailLink {
font-weight:200;
color:#5F5F5F;
text-align:left;
text-decoration:underline;
}
a:hover.emailLink {
font-weight:200;
color:#333333;
text-align:left;
text-decoration:underline;
}
</style>
</HEAD>
<BODY>
<%
Const APS = "<YOURCMS>"
Const UserID = "<USERWITHADMINRIGHTS>"
Const Password= "<PASSFORTHSTUSER>"
Const Aut = "secEnterprise"
Function Logon(ByRef IStore)
Dim SessionManager
Dim Result
Result = FALSE
Set SessionManager = Server.CreateObject("CrystalEnterprise.SessionMgr")
If Err.Number = 0 then
Dim Sess
Set Sess = SessionManager.Logon(UserID, Password, APS, Aut)
If Err.Number = 0 then
Set IStore = Sess.Service ("", "InfoStore")
Set Session("IStore") = IStore
Result = TRUE
End If
end if
Logon = Result
End Function
Function MakeWebPage(Reports)
Dim pRpt
Dim pRpts
Dim MyStore
Response.Write("<HTML>")
Response.Write("<BODY")
Response.Write("<FORM Name='main'>")
Response.Write("<TABLE>")
Response.Write("<TH class=tableHeading>Reports</TH>")
Response.Write("<TR class=tableHeadingGreen>")
Response.Write("<TD>ID</TD><TD>Title</TD><TD>Description</TD></TR><TR>")
Set MyStore = Session("IStore")
for each pRpt in Reports
Response.Write("<TD>" & pRpt.ID & "</TD><TD>" & pRpt.Title & "</TD><TD>" & pRpt.Description & "</TD></TR><TR>")
Next
Response.Write("</TR></TABLE></FORM></BODY></HTML>")
End Function
Sub Main
Logon IStore
Set Result = IStore.Query("Select SI_ID,SI_NAME,SI_DESCRIPTION From CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' order by SI_NAME" )
Dim IStore
Dim Result
MakeWebPage(Result)
End Sub
Main
%>
</BODY>
</HTML>