Macromedia ColdFusion 5.0 Sample

ballscauliflowerΛογισμικό & κατασκευή λογ/κού

30 Ιουν 2012 (πριν από 4 χρόνια και 9 μήνες)

558 εμφανίσεις

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 2 -


RELEASE NOTES -------------------------------------------------------------- 4
GENERAL CONFIGURATION NOTES----------------------------------------- 5
NORTHWIND DATABASE CONFIGURATION ------------------------------- 8
RUNNING THE DEMO--------------------------------------------------------- 8
FILE RETURN------------------------------------------------------------------ 9
LOAD BALANCING SERVER INSTALLATION----------------------------- 10
MISCELLANEOUS INFORMATION----------------------------------------- 13

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 3 -

Dynalivery Corporation provides sample source code, screencam movies, and other
documentation as only aids for learning specifically about our Parallel Crystal Report Server while
providing a general overview of Web Reporting.
These materials are subject to change without notice. We provide them on an "as is" basis
without warranty.
Please do not treat them as production quality components to use within your own application
without your own comprehensive testing.
Dynalivery recommends that its customers establish separate development, test, and production
environments and promote applications and report templates step by step as they prove
themselves in each environment, under conditions of realistic test data, network load, database
load, and report concurrency.
In addition, Dynalivery recommends that Parallel Crystal is evaluated and operated on server
computers that match or exceed the hardware specifications in our Installations Guide and with
staff that have experience with the Seagate Crystal Reports Designer, Microsoft Windows NT
network administration, and SDK level programming in the Web Application Server with which
they are using Parallel Crystal.

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 4 -

Release Notes
This sample has been tested extensively and works without problems under most circumstances.
However, there are certain special cases where it may not retain full functionality. The
circumstances, environment and suggested resources are documented below:


Operating System: Windows NT 4.0 SP 6a
Application Server: Macromedia ColdFusion 5.0
PCRE Version: 2.6
Other installed components: MDAC 2.5 and Microsoft IIS (from Win NT Option Pack)

Nature of the problem:

The web browser hangs when processing certain requests. The pattern of failure is random. At
times, the machine hangs when trying to quit Windows NT.

Possible Cause:

ColdFusion 5.0 has a security manager from a third party vendor. This manager has been known
to cause Windows NT to hang on exit. This has also caused us certain problems with Adobe
Acrobat Reader and MS IE. If this security manager is disabled, we are confident our product will
work without any problems.
Suggested fixes and resources
At this point, we do not have a fix for the problems associated with the security manager. As a
workaround, we suggest that you remove the manager from your ColdFusion install. This can be
done by running the installation program and removing the “Advanced Security Feature”

For more information, please visit these web sites:
Security Manger:

For additional information about the sample and / or assistance, please call or email Dynalivery
Tech Support.

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 5 -

General Configuration Notes
Preliminary setup
Double click the self-extracting archive to extract the sample to C:\. By default it should extract
to two folders called “ColdFusionSample” under the C:\inetpub\wwwroot (default) folder on
the ColdFusion server machine and “images” under the C:\. If your IIS webroot folder is
different, edit the "Unzip to” path in Winzip to a folder, which is accessible by the web
server. WinZip will automatically create a folder named ColdFusionSample. The images folder
contains the images for generating the sample multitable DOR report,
This demo requires a working installation of ColdFusion 5.0 Application Server. It also assumes
that Parallel Crystal 2.6 is installed on the same machine as ColdFusion. If you would like to test
the file return feature using multiple machines, please refer to our release notes for pertinent
The ColdFusionSample\Pcre directory contains a file named demos.cfm, which contains
configuration settings for this sample. You should make the following changes to this file:
•= Edit line A to state the default output directory for the generated reports on the Cold
e.g. <cfset OutputDir =

•= Edit line B to state the default input directory of the report template files
e.g. <cfset InputDir = "C:\\Progra~1\\Dynalivery\\Pcre\\SampleReports">

•= Edit line C to state the default URL of the output directory on the Cold Fusion server.
Replace “MYPC” with your Cold Fusion server machine name
e.g.<cfset OutputURL =

•= Edit line D to state the DNS of the default report server
e.g. <cfset server="PCRE Server">

•= Edit line E to state the default path of the DORDataFile.dat
<cfset DORDataFilePath =

•= Edit line F to state the default data base user name
<cfset UserName = "scott">

•= Edit line E to state the default data base password
<cfset Password = "tiger">

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 6 -

Using ColdFusion 5.0 with Parallel Crystal Java API
This demo contains ready to use class files in the <path_to_ColdFusionSample >Pcre\java
directory. To run the java client part of the demo, copy the contents of the folder
<path_to_ColdFusionSample>\Pcre\java to the folder

The next step is to register these Java classes on the ColdFusion Server

Registering Custom Java Classes on the ColdFusion Server
•= Log on to the ColdFusion Server Administrator. This can be found at:
Start -> Programs -> Macromedia ColdFusion Server 5 -> ColdFusion Administrator

•= The welcome screen will prompt you for a password. This password is the same
password you entered during installation.

•= Once you are logged into the server, there is a list of links on the left. Select the “CFX
Tags” option under the “Extensions” section.

•= Click the “Register Java CFX” Button

•= The tag name field should have “CFX_” prefix already assigned. Add “J_PCRE” to it so
that the result reads CFX_J_PCRE. In the class name field, type in J_PCRE. Click the
Submit changes button.

•= Repeat the step above for the J_PCReport class. This means the tag names should read
CFX_J_PCReport while the class names should be J_PCReport. Click the Submit changes

•= Repeat the step above again for the DeleteFiles class. The tag name is CFX_DeleteFiles
and the class name is DeleteFiles. Click the Submit changes button.

Configuring Java settings on the ColdFusion server:

•= Under the “Extensions” section, click the “JVM and Java Settings”.

•= Do NOT check the “Load JVM when starting ColdFusion” check box.

•= In the Java Virtual Machine Path field, enter the exact path to the JDK 1.2.x jvm.dll (For
a default install of JDK 1.2.2 this should be C:\jdk1.2.2\jre\bin\classic\jvm.dll

•= In the classpath field, enter the following paths with a semicolon (;) between each entry:

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 7 -

Alternately, you may browse to each of these files one by one by clicking the browse

•= Ensure that the CFX Jar Path field reads C:\CFusion\Java\classes

•= Click the Submit changes button.

•= Restart the ColdFusion Admin Server service using the Control Panel

Configuring to run multitable DOR report
We have provided an .rpt file called EmployeesWithSalaryHistory.rpt and it can be
found in the following directory: C:\Program Files\Dynalivery\PCRE\SampleReports.
This is a report template requires multitable DOR. In order to run this report you need to
set the following class path as in the previous section:

For more information about multitable DOR, please download the sample code from our web site.

Run the Demo on a Load Balancing Channel

•= Using the Parallel Crystal Manual load balancing section to set up a channel. Edit the file
<path to ColdFusionSample>\ to include all the machine names in
the channel. For more information refer to the
Load Balancing Server installation.

•= Log on to the ColdFusion Server Administrator. This can be found at:
Start -> Programs -> Macromedia ColdFusion Server 5 -> ColdFusion
•= Under the “Extensions” section, click the “JVM and Java Settings”
In the classpath field, append the existing path with <path to ColdFusionsample>

•= Restart the Cold Fusion Application Server service by click on Control Panel, Services,
Cold Fusion Application Server, Stop, Start.

Open your browser with the following address:

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 8 -

Northwind Database Configuration
The NorthWind Demo is a more complex set of reports. These reports require an ODBC DSN
on the report server connected to the Northwind.mdb Access database. Northwind.mdb is
located in the <path_to_Dynalivery>\Pcre\SampleReports folder. More information may
be found under the “miscellaneous information” section.

Running the Demo

•= Start Parallel Crystal from the Start Menu and run in desktop mode.

•= Make sure that ColdFusion has been restarted since the last change was made in any of
its settings.

•= Point your browser to the following address:

Note: Adobe Acrobat Reader is needed to view *.pdf output. Acrobat Reader is available free at or can be loaded from the Parallel Crystal CD.

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 9 -

File Return

When a request is sent to a Parallel Crystal Server, it generates a report in the appropriate
format and then stores this report on the report server machine. However, there may be
circumstances when it is more desirable to have the generated report stored on the client
machine. This may be done through Parallel Crystal’s file return feature.

File return is implemented as shown below:

//Creating the client
PCREApplicationClient client = new PCREApplicationClient(hostname)
client.setRetrieveMode(true)//turns file return mode on

To see the file return feature at work in this sample, check the “Use File Return” option. You will
need to specify a qualified report server name other than the machine you are on. Please refer to
the Parallel Crystal v2.6 installation guide for details on installing and configuring a report server.
Also, ensure that the specified output directory is already created as the program will not create
a new directory.

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 10 -

Load Balancing Server

Insert the Parallel Crystal CD into the CD drive. An installation shield should come up
automatically. Parallel Crystal 2.6 has both server and client components. You may install either
separately or together. The PCRE_26.exe executable is used to install both server and client
versions. Parallel Crystal v2.6 requires the following items to be installed before attempting to run
its install shield:
For a Server Installation
1) Windows NT Server v4.0 (SP5)
2) Crystal Decisions Crystal Reports v7.0.1.100
NOTE: Beginning with PCRE 2.6, the install script no longer places Crystal
Reports run-time libraries or the Crystal Reports Designer on the report server. It
depends on the prior installation of Crystal Decisions Crystal Reports v7.0.1.100
to provide the runtime libraries.
For a Client Installation
Java Client
1) Sun's Java Runtime Environment (JRE) v1.2
COM Client
1) Sun's Java Runtime Environment (JRE) v1.2
2) Microsoft's Java Virtual Machine (Build 3802 or higher)

Once you have verified the existence of the appropriate files named above you should go through
the install as you would a normal installation. However when you get to the Load Balancing
screen you should choose the enable radio button, specify a channel name and check the “Run
as Load Balancer Server” checkbox to run this installation of PCRE as a Load Balancer Server.
The channel name is a string value so it has no restrictions. We do however recommend it be
descriptive of its function. (see figure below)

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 11 -

A channel is a logical grouping of load balancing report servers and load balancing clients that
are connected via the network and are configured to bear the distributed load of all the requests
received into the channel. As illustrated above a channel is defined by the user, as a string value,
at installation time. It can also be assigned later by making registry edits.
After you have made the appropriate choices in the Load Balancing dialogue you can continue
with a normal installation as outlined in the PCRE v2.6 Installation Guide.

Load Balancing Client

To specify a report server as being a load balancing client you would simply install Parallel Crystal
normally without enabling load balancing. You would then need to make registry edits to
make the report server in question a Load Balancing Client. (see the configuration instructions

Load Balancing Server and Client

LoadBalancingClient - an object which runs on the Parallel Crystal Server machine which
sends load updates to the LoadBalancerServer. If activated, this object sends load updates to all
LoadBalancerServers which are operating on the same channel. This object is activated if the
UseLoadBalancing value in the Gateway registry key is set to true, yes, or 1. The channel name
which the LoadBalancingClient is operating on is specified in the registry.

LoadBalancerServer - an object which runs on the Parallel Crystal Server machine which
receives load updates from LoadBalancerClients. If activated, this object receives load updates
from all LoadBalancerClients which are operating on the same channel. This object is also
capable of choosing which Parallel Crystal machine should be used to run a report based on the
chosen load balancing algorithm. The LoadBalancerServer is activated by adding the
LoadBalancer key to the registry. The channel name which the LoadBalancingServer is operating
on is specified in the registry.

From the start menu go to run and type in “regedit”. This will cause the registry editor to launch.
Expand down to HKEY_LOCAL_MACHINE\SOFTWARE\Dynalivery\PCRE\2.6\LoadBalancer and
make the following edits:

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 12 -

In the LoadBalancer key (if this key does not exist you can add it): The following String values
need to be added if they do not already exist:
•= LoadChannelName value specifies the channel which would be used by the
Load Balancer server. The default value for the the LoadChannelName is
•= EnableLBTrace value if set to “true”, “1” or “yes” allows load updates to be
sent to the console. The default value for EnableLBTrace is true
•= Algorithm value specifies the algorithm, which will be used by the Load
Balancer Server. You can either specify the “Load-Factor” or “Round-Robin”
algorithm. As the name suggests, the round-robin algorithm will cause the load
balancer server to return the ip address of the next gateway on the circular list
of gateways on the desired channel. The load-factor algorithm will cause the
load balancer server to return the ip address of the least loaded gateway on the
list of gateways on the desired channel. The default value for algorithm is “Load-
•= LoadBalancerPort by default is set to 14060 and could be changed in this
registry key if another port is to be used.
LoadBalancerServer value can be set during installation by clicking the
check box or changed here in the registry key later. The value determines
whether the client uses loadbalancing. Default value for this key is “0” or
“false”. Loadbalancing can be toggled on by setting the string value to
either “true” “1” or “yes”.

LoadBalancerClient default value is always set to “true”.

Macromedia ColdFusion 5.0 Sample
Modified 10/31/01

- 13 -

Miscellaneous Information
Running an SQL Script
Given a file of SQL commands (such as BikeData.sql, which may be viewed in any text editor),
and an SQL connection to a database (such as SQL*PLUS, provided with Oracle 8i), it is possible
to run those commands automatically. Simply type
START <path_to_Sample>\BikeData.sql
at the SQL command prompt. This will create a table in the database named "BikeData" with 25
rows of bike-related merchandise, according to the commands in BikeData.sql. You can check
this by typing
at the SQL command prompt.

Setting up ODBC data sources (DSN’s)
For Microsoft Access
From the Control panel, open the ODBC Data Sources manager. Select the System DSN tab and
click on the "Add" button. Select the "Microsoft Access Driver" and click finish.
A Microsoft Access Driver configuration window pops up. The Data Source Name should be set to
the name specified in the instructions (eg. BikeData). In the Database area, click on the "Select"
button and find the <path_to_Sample> folder. Select the appropriate *.mdb database from
that folder and click OK. Click OK on the configuration window to finish.
For Oracle
From the Control panel, open the ODBC Data Sources manager. Select the System DSN tab. Click
on the "Add" button and select "Oracle ODBC Driver" (near the bottom of the list) and click finish.
A Oracle8 ODBC Driver configuration window pops up. The Data Source Name should be set to
"BikeData", the Service Name should be the name of the Oracle database service to connect to
followed by the database's internet domain name. It might look something like this: