Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<BODY>
<%
Const APS = "YourCMS"
Const UserID = "REadUser"
Const Password= "Pass"
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
Sub ShowReports(Rid,FolderName,IStore)
Dim indx,Result3,Istr
Response.Write("<Table><TH> Folder: " & FolderName & "</TH><TR>")
Set Result3 = IStore.Query("Select SI_NAME, SI_ID, SI_DESCRIPTION From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' And SI_INSTANCE=0 AND SI_PARENT_FOLDER=" & Rid & "ORDER BY SI_DESCRIPTION")
for indx = 1 to Result3.count
Response.Write("<TD>" & Result3.Item(indx).Title & "</TD><TR>")
Next
Response.Write("</TR></TABLE>")
End Sub
Sub Main
Dim IStore,Result2,FolderName
Dim itm
Logon IStore
Set Result2 = IStore.Query("SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Folder' ORDER BY SI_NAME")
for itm = 1 to Result2.Count
ShowReports Result2.Item(itm).ID, Result2.Item(itm).Title,IStore
Next
End Sub