In the next part of the code, the InfoStore
object is retrieved using the RetrieveIstore
function.
//Try to retrieve the InfoStore object.
//If it failed redirect the user to the logon page.
RedirectWithFrames("LogonForm.csp");
//Otherwise display the folders and the "Up a Level" link.
Response.Write ("<B>Folders</B><BR><BR>");
If the RetrieveIStore
function fails, then there is a rather large problem: there is no way to authenticate the current user. Thus, the only option available is to redirect the user back to the logon page. Since this tutorial uses frames, client side JavaScript is used to redirect the user and overlay the frames. See Folders.csp for details. If the RetrieveIstore
function succeeds, then the folders are displayed for the authenticated user.
//Retrieve the parent's ID for the current folder.
ParentID = RetrieveParentID(IStore,CurrentFolderID);
//Check to see if the query was successful.
//If this is not the top level of folders display the "Up a Level" link.
Response.Write ("<A HRef='Home.csp
Response.Write ("There was an error trying to retrieve the parent folder.");
Result = PrintChildFolders(IStore,CurrentFolderID)
Response.Write ("There was an error trying to retrieve the sub
Note the manner in which the "Up a Level" link is built:
Response.Write ("<A HRef='Home.csp
As was the case when building the links to each sub
You now have a working copy of Folders.csp. To see a full version of the CSP page that you've created, see Folders.csp
Lesson 2b: Listing the reports in a folder
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |