CrystalViewer Web 4.0 Version

SAMPro Installation and Configuration

Preface

CrystalViewer is a program written by Data-Basics Inc. to allow SAMPro users to view Crystal Reports on their workstations. This program is only for viewing existing Crystal Reports and not for any type of report development. CrystalViewer Web 4.0 is the latest version that can run on current versions of Windows. The following information is for administrative users to create the appropriate registry entries in SAMPro.

Server Information

CrystalViewer Web has been implemented in .Net as ASP.NET website. This allows the reports to be run in a web browser on any workstation as a web page. You will need to contact Data-Basics for help in setting up this server.

Workstation Installation

Unlike previous versions, there is nothing to install on the workstations. The reports are auto-generated web pages with all the functionality of previous versions. The user should always uninstall any previous versions of CrystalViewer.

SAMPro Registry Settings for CrystalViewer Web 4.0

This version requires very little registry settings. The first three are the only “required” settings in RED. The others are for using some dynamic data in the report itself. The ID of this registry is CRVWeb.

Setting Key

Typical Default

Setting Information

hosturl

https://**web app**

This is set to the html path of the web app Please refer to the server setup of CrystalViewer Web

PassInitialValues

true

true or false. This setting allows SAMPro to override functions and launch CrystalViewer instead of SAMPro native reports. For
example: the WO Print button located on the work order viewer can be over ridden to launch a Crystal work order report and pass the work order ID (parameter would have to be named
wrkordr_id) from the screen. This functionality requires the sys-function-substitutions registry setting to work properly. See SAMPro help.

registryAsQueryString

true

required for CrystalViewer Web

security

^securitylike^

Will update the parameter “security” in a Crystal Report with the current security filter string of the user running the report in SAMPro *See Report Creation Suggestions section below

user

^userid^

Will update the parameter “user” in a Crystal Report with the current user ID running the report in SAMPro

companyname

^companyname^

Will update the parameter “companyname” in a Crystal Report with the registry company name in SAMPro

branch

^branchfilter^

Will update the parameter “branch” in a Crystal Report with the Branch ID filter in User Record see below 1

pm

^pmfilter^

Will update the parameter “pm” in a Crystal Report with the PM ID filter in User Record see below 2

location

^locationfilter^

Will update the parameter “location” in a Crystal Report with the location ID filter in User Record see below 3

Report Creation Suggestions

In designing a Crystal Report, to follow the consistency of security as do all SAMPro Reports, you should always include the following in your Record Selection Formulas. It is not required, but highly recommended if this report were ever to be given to other SAMPro users who may be using security:

Setting up SAMPro to have Crystal Reports run in the CrystalViewer Web

A user defined function must be created for each report. In each user defined function, the Function ID should be a descriptive and unique identifier for this report. In the Function Name you can provide any descriptive name for the report that will be visible on the report menu. In the Application box you must point to your CRVWeb (*be aware that previous versions of CrystalViewer used CRV and would need to be changed) registry setting, and finally in the Application Parameters box provide the full report name preceded by “report=”. For example “report=mycrv.rpt”. The Function Category should always be marked as a Report. This will then show that report in the Reports Menu (if the user has permissions to the report in their User Group). Any additions or changes in the user defined function along with the User Group will require the user to log off and back on to see it. Please see below for a typical setting.

ODBC Settings for CrystalViewer

ODBC does not need to be set up on the workstation for the Web version of CrystalViewer

Web Server Settings

The settings are contained in a file called web.config in the root directory of the program. Below in yellow are the variables that will need
to be set.

  1. The DSN is no longer specified from the SAMPro registry. It is now contained in the web.config file.

  2. The setting called VDPath seen below is a pointer to the path that the report files are shared from on the web server. This

    stands for Virtual Directory as a Virtual Directory is required to be setup in IIS during the installation. The VDPath uses a relative path to access this folder.

  3. Email settings are now stored in the web.config as well, this allows for SSL email.

Below is a portion of the above mentioned web.config file that would need some editing. Only knowledgeable users should edit this.

  <setting name="DSN" serializeAs="String">

             <value>Server=SQL Server; Database=XYZ; Trusted_Connection=yes; Driver={SQL Server Native Client 11.0}</value>
  </setting>
  <setting name="VDPath" serializeAs="String">

<value>\reports</value>
  </setting>
  <setting name="smtpUseSSL" serializeAs="String">

 <value>True</value>
  </setting>
  <setting name="smtpPort" serializeAs="String">

 <value>587</value>
  </setting>
  <setting name="emailUID" serializeAs="String">

  <value>Service@XYZ.com</value>
  </setting>
  <setting name="emailPW" serializeAs="String">

  <value>********</value>
  </setting>
  <setting name="smtpServer" serializeAs="String">

  <value>your.emailsrvr.com</value>
  </setting>