To download the CSP files from this tutorial, click TutorialSamples.zip. For more information, see Code examples.
<META HTTP
<!-- #include file=helper_js.csp -->
<!-- #include file=RetrieveIStore.csp -->
function ChangeReportName(ReportID ,IStore, NewName)
//This function changes the name of a report given its
//ReportID - The ID of the report.
//NewName - The new name for the report.
//IStore - The InfoStore object required to interface with server.
//Function returns true if it was successful and false otherwise.
//The query that will select the name of the report.
//Retrieve the current name of the report.
Query = "Select SI_NAME, SI_ID From CI_INFOOBJECTS Where " +
Result = IStore.Query(Query) ;
//Write the result back to the APS.
function RedirectWithFrames(URL)
Response.Write ("<script language=javascript>open (\""+URL+"\",\"_top\");</script>");
var ReportID, CurrentFolderID;
//Request the new name that the user entered in the text box
NewName = Request.Form.Item("ReportName");
//Retrieve the report ID from the page's parameter list.
ReportID = Request.QueryString.Item("ReportID");
//Retrieve the ID of the folder that is being displayed.
CurrentFolderID = Request.QueryString.Item("FolderID");
//Try to retrieve the InfoStore object
//If it failed, redirect the user to the logon page.
Response.Write ("<META HTTP
RedirectWithFrames ("LogonForm.csp");
if (!(ChangeReportName (ReportID,IStore,NewName)))
Response.Write ("There was an error and as" +
" a result I could not change the report's name.");
//If the name change was successful then send the user back
Response.Redirect ("ReportDescription.csp
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |