Examples (JavaScript)

To use example files
  1. Make sure that the example file is saved with a CSP extension. You may need to cut and paste the code into a text file and save it with a CSP extension.

    Note:    If you are using JavaScript, you will need to include the helper file, helper_js.csp which is placed by default in Windows C:\Program Files\Crystal Decisions\Web Content\Enterprise\ePortfolio\language and in Unix in . Replace language with the information appropriate to your version of Crystal Enterprise: use en for English or ja for Japanese.

  2. Copy the example to the virtual directory of your Web Component Server (WCS) and, if it is on a separate machine, your web server. See the Crystal Enterprise Administrator's Guide for information about configuring servers and mapping paths.
  3. Ensure that your web server and Web Connector are correctly configured and started.
  4. From the Crystal Enterprise program group, select Crystal Launchpad, and click Crystal ePortfolio. You will be logged on to the Crystal Enterprise system as a guest. Depending on the sample that you are working on, you may need to log on as Administrator.
  5. In the same browser window, type the location and name of the example file that you want to view.

    Note:    If you type a local path for the CSP file in the browser, the example will not run. You must specify an HTTP style address; for example, C:\Inetpub\wwwroot\example.csp becomes http://localhost/example.csp.

You will need to log on to the Crystal ePortfolio again if you close your browser, or if the Enterprise Session expires. If an example is run without first logging on to the APS, an error message will appear or the example may run incorrectly.

Tip:    If you want to use the name of the constant, instead of its value, you need to include the appropriate file: CeConstJS.inc for JavaScript, or CeConstVBS.inc for VBScript. Both files are placed by default in C:\Program Files\Crystal Decisions\Web Content\Enterprise\websamples and in Unix in crystal\webcontent\enterprise\websamples. Confirm that the constant that you are referencing by name is included in the .inc file that you are using or, if it is not included, add it.

UNIX:    Sample reports are not installed by default in the UNIX installation. If an example references a sample report, the example will only run on Windows NT/2000. On UNIX, you will want to change the sample to reference an appropriate report that is available.



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