Renaming objects

Users can rename a folder or report in the Contents area by selecting an item from the list and clicking the Rename button. When the button is clicked, the Rename function is called. This function launches the rename.csp form, and a number of values are submitted, including the old name. After the user enters the new name into the rename form and submits it, action=rename is posted to viewmanager.csp.

The following is a conditional statement in viewmanager.csp:

if(action == "rename")

This statement ensures that if action=rename appears in the query string, the selected object's id and new name is retrieved and passed as parameters into the Rename subroutine. The Rename subroutine retrieves three properties for the object: SI_ID, SI_NAME, and SI_FILES. It then replaces the object's old name with the new name and commits the changes to the APS.

Note:    For information on using the SDK to rename a report, see Lesson 3c: Renaming reports in the Crystal Enterprise Getting Started Tutorial.



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