Viewing the table

The main part of Reports.csp prints the table on the page.


//Retrieve the CurrentFolderID from the file's parameter list.

CurrentFolderID = Request.QueryString.Item("FolderID") ;


//Try to retrieve the InfoStore object.

IStore=RetrieveIStore();

if (IStore==null )

    //If it failed, redirect the user to the logon page.

    RedirectWithFrames ("LogonForm.csp");

else

{

    var HTMLTable ;

    HTMLTable= RetrieveReports(CurrentFolderID, IStore,Error);

    if (HTMLTable!=null )

    {

        Response.Write ("<B>Report Listing</B><BR><BR>");

        if (HTMLTable != "" )

        {

            Response.Write (HTMLTable);

        } else

            Response.Write ("No reports...");

    }

    else

    Response.Write ("There was an error trying to retrieve the reports.");

}

    



After you have pasted this code into the Reports.csp file, ensure that you have included the RetrieveIStore function. This page needs it to communicate with the APS. Additionally, don't forget to surround all of the script with the <% and %> tags.

See Reports.csp.

End of lesson

Congratulations! You've reached the end of this lesson. To see a full version of the CSP page that you've created see Reports.csp

Go to next step:

Lesson 2c: Displaying the complete path to the current folder



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com