Linking to objects

Users can add report shortcuts to a destination folder by selecting items from the Contents list and clicking the Shortcut button. When the button is clicked, the LinkTo function is called. The LinkTo function retrieves the list of selected source objects, and then loads move.csp, passing in the following parameter value: moveaction=linkto.

If the user clicks the Copy button, then viewmanager.csp is reloaded, and action=moveaction is passed in. The following is a conditional statement in viewmanager.csp:

if(action == "linkto")

This statement ensures that if action=linkto appears in the query string, the IDs of the source objects to be linked to the current destination are requested and four properties for these objects are retrieved: SI_ID, SI_NAME, SI_PROGID, and SI_ALIAS_TARGETID.

Next, the LinkTo subroutine is called. This subroutine ensures that if a link is being made to a shortcut, the proper source ID (TargetID) is used. The LinkTo subroutine then creates a link from the selected source objects to the destination area, and commits the changes to the APS.



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