To download the CSP files from this tutorial, click TutorialSamples_vb.zip. For more information about using the samples, see Code examples.
<META HTTP
<!-- #include file=RetrieveIStore.csp -->
Function ChangeReportName(ReportID ,IStore, Error, 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.
'Error - A variable to hold the error if one occurs.
'Error - Contains the error number: 0 if successful.
'The query that will select the name of the report.
'Retrieve the current name of the report.
Query = "Select Top 1* From CI_INFOOBJECTS Where " & _
Set Result = IStore.Query(Query)
'There was an error querying the server.
'Write the result back to the APS.
'Check if the write was successful.
'Request the new name that the user entered in the text box
NewName = Request.Form("ReportName")
'Retrieve the report ID from the page's parameter list.
ReportID = Request.QueryString("ReportID")
CurrentFolderID = Request.QueryString("FolderID")
'Try to retrieve the InfoStore object.
If RetrieveIStore(IStore)=FALSE Then
'If it failed, redirect the user to the logon page.
Response.Write "<META HTTP
Response.Redirect "LogonForm.csp"
ChangeReportName ReportID,IStore,error,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 |