Reviewing Report Distribution Options

You might be wondering why an entire chapter would be devoted to report distribution. It seems logical that report files could simply be emailed or even printed and sent to whoever has a need for that particular information. This simplistic viewpoint however would overlook some important considerations when delivering reports to business users:

  • Static Data vs Live Data As soon as a report is printed to paper or exported to an external format like Adobe Acrobat (PDF) or Microsoft Excel (XLS), it becomes static and potentially out of date. Depending on the nature of the data being used in the report, this might be an issue. Even for situations in which having live data isn't important(for example, reports based on historical data), interactive features such as drill-downs are lost when printing or exporting a report.

  • IT Maintenance Because features such as drill-downs and hyperlinks are supported by the Crystal Reports Designer, it might seem logical to install the designer on each person's desktop who might need to view reports. This powerful, distributed report creation capability might be overwhelming to some end users and more importantly can grow into an IT maintenance headache when the audience for reports grows large.

  • Report Maintenance Distributing out reports and their associated files to the desktops of business users makes it cumbersome to make updates and additions to those reports because of the need to manually update each user's machine and associated reports.

  • Security Only certain business users should have access to certain reports, and even within this group of authorized business users, certain levels of restrictions should be in place. The average business user might be given the ability to change the data displayed in a report by entering parameter values, but should not be able to change core aspects of a report. This report design and modification capability should be reserved for a subset of the reporting user base.

  • Presentation to a Variety of Formats Often, reports need to be presented in various formats, whether it is being previewed onscreen using one of the Crystal Reports viewers, embedded into a Web-based portal, or even displayed on a wireless device (for example, PDA, Mobile Phone, and so on).

Although more factors that affect report distribution exist, those listed previously are important ones to initially consider. As stated earlier, there are various methods for distributing Crystal Reports. Each method addresses some or all of the preceding report distribution factors. Often, if one of the factors is not addressed, it can be addressed with some additional work or by using a different method that might cost more in licensing and development time. This build versus buy decision will be a factor in which report distribution system you choose to implement.

The main report distribution scenarios are as follows:

  • Building a custom application that delivers reports. Sometimes the entire purpose of the application is to do just this other times, reporting is just a component of a surrounding application. If the application is a desktop application, the Report Designer Component (RDC) should be used. If the application is Web based, the Report Application Server (RAS) should be used.

  • Using a pre-built report distribution system Crystal Enterprise. There are two editions of Crystal Enterprise: Standard and Professional. These two editions address different needs outlined later in this hour.

graphics/bookpencil_icon.gif

When distributing your Crystal Reports and depending on the method selected, additional licenses might need to be purchased beyond your copy of Crystal Reports 9. To determine requirements or to purchase additional licenses, a Crystal Decisions sales representative should be contacted through the www.crystaldecisions.com Web site or by calling 1-800-877-2340.


Table 23.1 presents an overview of the different methods of Web report distribution and of each method's distinct advantages and disadvantages.

Table 23.1. Web Reporting Distribution Methods

Crystal Reports Web Distribution Method

Advantages

Challenges

Software and Versions Required

Crystal Enterprise Standard Unmanaged

  1. Direct URL access to Crystal Report files in virtual directories.

  2. Flexible URL commands supported to control viewers, parameters, filters,exporting, and so on.

  3. Five free concurrent user licenses.

  1. Unsecured reports.

  2. Scalability limitation single server deployment.

  3. No scheduling capabilities.

  4. No personalization.

  5. No user-based security.

Crystal Reports v9 Professional, Developer, or Advanced Edition

Crystal Enterprise Standard or Professional

Crystal Enterprise Standard Managed

  1. Secured Repository for Crystal Report files directly accessible from Crystal Reports Designer.

  2. Provided Crystal Management Console for Web-based administration.

  3. Sample e-Portfolio interface or flexible URL commands to access reports in a secured manner.

  4. Five free concurrent user licenses.

  1. No user-based security.

  2. Scalability limitations single server deployment.

  3. No personalization.

  4. No extensibility in object management (for example, Crystal Analysis).

Crystal Reports v9 Professional, Developer, or Advanced Edition

Crystal Enterprise Standard

Crystal Enterprise Professional

  1. User and User Group level security model Personalization and Publish/Subscribe models.

  2. Horizontally and vertically scaleable server architecture.

  3. Advanced report scheduling capabilities, including event dependencies.

  4. Sample ePortfolio interface or flexible URL commands to access reports in a secured manner.

  5. Secured Repository for Crystal Report files directly accessible from Crystal Reports Designer.

  6. Extensible architecture to manage third-party objects in addition to Crystal Reports (for example, Crystal Analysis or Excel).

  7. Open Security model to enable integration with LDAP or NT authentication.

  8. Fault Tolerant and Seamless Fail-over architecture.

  1. Increased administration commensurate with increased functionality.

  2. Increased licensing costs to match increased out of the box functionality

Crystal Reports v9 Professional, Developer, or Advanced Edition

Crystal Enterprise Professional

Report Application Server

  1. Ultimately flexible access to report creation, access, and viewing functionality.

  2. Multithreaded object model to facilitate scaling on Crystal Enterprise infrastructure.

  3. Available in both COM and Java object models.

  1. Requires programming expertise to leverage power of object model.

  2. Requires Crystal Enterprise Professional to scale to large numbers of users.

  3. Still does not provide 100% of Crystal Reports Design functionality in the object model.

Crystal Reports v9 Advanced Edition

Crystal Enterprise Professional for Delivering to Large User Bases

Report Design Component Advanced

  1. Ultimately flexible access to report creation, access, and viewing functionality.

  2. Familiar to Crystal Reports designers who have used previous versions of the RDC.

  1. DLL is required to be present on Web server further limiting scalability and introducing Web server contention.

  2. COM object model only No Java object mode available.

  3. Requires programming expertise to leverage power of object model.

Crystal Reports v9 Developer or Edition

Crystal Reports v9 Report Creation API License for any Report Creation programming

Each of the distribution methods for Crystal Reports will be explored in more detail in the next three sections. With the exception of the RDC, each of the different methods provides a surprisingly simple migration to the next one up in the functionality ladder. Hour 24, "Crystal Reports in Applications A Developer's Perspective," explores the advanced developer methods of report distribution in addition to the new Report Parts distribution options in Crystal Reports version 9.

Unmanaged Report Web Access via Crystal Enterprise Standard

The simplest (and perhaps most familiar to existing Crystal Reports users) method of making Crystal Reports available over the Web is through the use of virtual Web directories set up on your Web server. (On Windows IIS, these can be set up through Internet Services Manager accessed through the Control Panel.) To provide Web access in this manner, Crystal Enterprise must be installed on either the Web server or a separate machine: If the latter, the Web Connector component of Crystal Enterprise must be installed on the selected Web Server. The Crystal Enterprise installation guide or online help files distributed with the Crystal Enterprise components should be consulted for help on installing components of Crystal Enterprise.

graphics/alarmclock_icon.gif

At the time of this book's printing, the latest shipping version of Crystal Enterprise was 8.5. This version does not support the Crystal Reports 9 file format and therefore will not work in conjunction with Crystal Reports 9. Soon after the release of Crystal Reports 9, a new release of Crystal Enterprise is expected that will fully support Crystal Reports 9. However, the Report Application Server (RAS) method of Web distribution discussed later in the hour will be available concurrent with the release of Crystal Reports 9.


To "Web-enable" existing Crystal Reports using this method and with Microsoft Internet Information Server (IIS) on the same physical server as Crystal Enterprise, the following steps are required:

  1. Copy all relevant Crystal Reports into a single physical directory accessible by your IIS Web server.

  2. Create a virtual Web directory for that selected physical directory by right-clicking on the folder from within Windows Explorer and selecting the Properties menu option.

  3. Click on the Web Sharing tab and select the Share This Folder radio button. Figure 23.1 displays the Web Sharing and Alias dialogs you will be faced with.

    Figure 23.1. Virtual Directory Setup dialogs.

    graphics/23fig01.jpg

  4. Enter an appropriate alias for your virtual directory (for example, Reports or CrystalWebReports).

  5. Click OK until you have saved all your changes, and the Crystal Reports in the selected physical directory will now be available over the Web at http\\webservername\virtualdirname\reportname.rpt, where

    • Webservername is replaced with your Web server's name

    • Virtualdirname is replaced with the Web sharing alias you created in step 4.

    • Reportname is any of the reports you have placed in the physical directory in step 1. Also, note that you need to include the .rpt extension.

Figure 23.2 displays one of the Crystal Reports sample reports being accessed through this method in a previous version of Crystal Enterprise.

Figure 23.2. A sample of a URL accessed Crystal Report.

graphics/23fig02.jpg

More than just basic and direct access to existing Crystal Reports through this unmanaged method, Crystal Reports and Crystal Enterprise provide numerous methods of controlling the delivery of reports. Table 23.2 lists a number of additional URL-based commands that enable enhanced control of the Web delivery of the Crystal Reports.

Table 23.2. Crystal Reports URL Based Commands

URL Suffix

Suffix Description

URL examples

INIT

The INIT command specifies the report viewer that will be used to view the report. If the INIT command is not specified, Crystal Enterprise detects the type of browser requesting a report and provides a default viewer that is most appropriate for that browser.

The default viewer for Microsoft Internet Explorer is the ActiveX viewer. The default viewer for Netscape Navigator is the Java viewer.

Other options include

actx = Active X Viewer

java = Java Viewer

html_frame = DHTML with frames

html_page = HTML

java_plugin = Java plug-in

nav_plugin = Netscape plug-in

http://machine/virdir/rpt.rpt?init=actx

CONNECT

The CONNECT command is appended to the INIT command with a colon. It reestablishes a connection to the Crystal Report Processing Server. This allows the business user to reset the report's parameters and logon information, and reprocess the report if necessary without having to begin a new browser session.

http://machine/virdir/rpt.rpt?init=actx:connect

PROMPTEX

The PROMPTEX command specifies values for parameters on a report or any of the main report's subreports.

The PROMPTEX command can be used to pass multiple values or a range of single values can be passed into a report by separating them with commas. Ranged values can use square and round brackets in the following flexible manner:

Bounded intervals

 ["<value>"-"<value>"] ("<value>"-"<value>"] ["<value>"-"<value>") ("<value>"-"<value>"] 

Unbounded intervals

 ("<value>"-) ["<value>"-) (-"<value>") (-"<value>"] 

A square bracket indicates that the interval is closed at that end, and that the specified number is included in the range; a round bracket indicates that the interval is open at that end, and that the specified number is not included in the range.

In order to pass Date or DateTime parameter values over the URL, use the single value or date range methods as specified here:

For single value Date or DateTime parameters, the promptex-<promptname> command requires double quotes. For passing date ranges, brackets must be used as shown previously.

Passing the country parameter "Ireland" into the sample report.

http://machine/virdir/rpt.rpt?init=actx&promptex-country="Ireland"

Passing the city parameter "Toronto" into the sample report's subreport called sub1.

http://machine/virdir/rpt.rpt?init=actx&promptex-city@sub1="Toronto"

Passing the region parameters "Asia" and "Europe" into the sample report.

http://machine/virdir/rpt.rpt?init=actx&promptex-regions="Europe","Asia"

The following URL extensions highlight the flexibility in the parameter range functionality:

Passing April through May into the report:

promptex-monthrange=("3"-"6")

Passing March through May into the report:

promptex-monthrange = ["3"-"6")

Passing July through December into the report:

promptex-monthrange =("6"-)

Passing date range parameters through the URL should follow the pattern of the following suffix:

promptex-DateRangeParm= ["date(2002,07,08)"-"Date(2002,12,10)"]

SF

The SF command allows for the specification of a selection formula for the report. Any selection formula passed via the URL using the SF command will be appended with the logical AND statement to any existing selection formulas already in the report.

http://machine/virdir/rpt.rpt?sf={Customer.Country}='Canada'

GF

The GF command specifies a group selection formula for the report. This command works in an identical manner to the selection formula SF command.

http://machine/virdir/rpt.rpt?gf=Sum({Customer.Sales},{Customer.Country})>1000000

PromptOnRefresh

The PromptOnRefresh command forces the involved report to prompt the business user for parameter field values when refreshed.

http://machine/virdir/rpt.rpt?promptOnRefresh=1

CMD and EXPORT_FMT

The CMD and EXPORT_FMT commandsenable the involved report to be exported to the any number of the different file formats outlined here:

Adobe PDF - U2FPDF:0

HTML 3.2 - U2FHTML:2

HTML 4.0 - U2FHTML:3

XML - U2FXML:0

Excel 5.0 (XLS) - U2FXLS:3

Excel 5.0 (XLS) Extended - U2FXLS:4

Crystal Reports (RPT) - U2FCR:0

Rich Text Format (RTF) - U2FRTF:0

Word Document (DOC) U2FWORDW:0

This URL will bring up the rpt.rpt report file in Adobe Acrobat format within a Web browser.

http://machine/virdir/rpt.rpt?cmd=EXPORT&EXPORT_FMT=U2FPDF:0

The URL commands outlined in the Table 23.2 highlight the breadth of flexibility available when delivering Crystal Reports over the Web through the unmanaged mode of Crystal Enterprise. When any report is accessed through this mode, a Crystal Enterprise guest license is used for the duration of the time the report viewer is active and (by default) until 20 minutes after the last sign of activity on a report viewer (for example, Next Page, Last Page, Drilling-down, and so on). It is important to forecast maximal concurrent usage before Web deploying reports to ensure that no business users are disappointed with a no-access notification message. User license requests above and beyond what is licensed on the Crystal Enterprise system will be rejected.

Managed Web Report Access via Crystal Enterprise Standard and Professional

Although the unmanaged method of deploying reports provides a quick and easy method of Web enabling reports, Crystal Enterprise provides additional rich scalability, scheduling, security, and personalization functionality as described in Table 23.2 that can only be accessed through the managed method of report distribution. Publishing Crystal Reports over the Web using either version of Crystal Enterprise (Standard or Professional) can be accomplished in one of three ways:

  • Use the File Save As Command in Crystal Reports and select the Enterprise icon. This will prompt for Crystal Enterprise Credentials and will require the administrator ID and password for Crystal Enterprise Standard or any valid user ID and password in Crystal Enterprise Professional. Figure 23.3 displays a Crystal Enterprise Logon screen.

    Figure 23.3. Crystal Enterprise Publishing Logon from Crystal Reports File Save As menu option.

    graphics/23fig03.jpg

  • Use the Crystal Management Console provided with Crystal Enterprise. Figure 23.4 displays a previous version of the console in which reports can be added through the Add Objects function. The Crystal Management Console is actually the central point of all Web administration for Crystal Enterprise, but its detailed description is beyond the scope of this book. See the Crystal Decisions Web site for more information on Crystal Enterprise functionality.

    Figure 23.4. Crystal Management Console for publishing Crystal Reports.

    graphics/23fig04.jpg

  • Use the Publishing Wizard provided with Crystal Enterprise. Figure 23.5 displays a previous version of the Publishing Wizard that is accessed through the Start menu and then the Programs and Crystal Enterprise menu options. The Publishing Wizard will step you through the report publishing process, which is the recommended process for beginners.

    Figure 23.5. The Crystal Publishing Wizard allows for Crystal Reports files to be quickly published into the Crystal Enterprise system.

    graphics/23fig05.jpg

Once published into Crystal Enterprise using any of these methods, a copy of the involved report is transferred into a secure file repository managed by Crystal Enterprise, and a record of the involved file is created in the Crystal Enterprise system database.

The published reports are now stored in a secured reporting system and can only be accessed by authorized Crystal Enterprise users.

Access to these managed stored reports is provided through two methods:

  • Using the Crystal Enterprise client interface called ePortfolio, accessed from the Start menu under Programs, Crystal Enterprise and the Crystal Launch-pad. Figure 23.6 displays a previous version of ePortfolio with the default logon ID of guest.

    Figure 23.6. ePortfolio Default Crystal Enterprise interface.

    graphics/23fig06.jpg

  • Using direct URL commands in an almost identical nature to that described for unmanaged report distribution with a slightly modified format. Instead of direct requests to the Crystal Report in a virtual directory, requests are made to the Crystal Enterprise system, and Crystal Reports are referenced through a Crystal Enterprise View Report command (viewrpt.cwr) and an Object ID that can be accessed from the Crystal Management Console. A sample URL could be http\\server\crystal\enterprise\viewrpt.cwr?id=1210.

All the URL suffix commands described in Table 23.2 can be applied to the end of these managed URL requests. The direct URL based report access method described previously is further extended within any managed Crystal Enterprise environment to include additional commands to leverage the additional security functionality that is provided.

These additional commands are described in Table 23.3, but the full descriptions are beyond the scope of this book. For more information on direct URL access to Crystal Reports through Crystal Enterprise, the Crystal Enterprise Manuals should be consulted.

Table 23.3. Additional URL Based Commands

URL Suffix

Suffix Description

URL Example

ID

A required suffix for accessing reports in Crystal Enterprise through a URL. The ID is a unique identifier of current report within the Crystal Enterprise system. It can be discovered through the Crystal Management Console.

http://server/crystal/enterprise/viewrpt.cwr?id=510

APSTOKEN

The APSTOKEN provides one of two methods of passing user authentication information to Crystal Enterprise to enable the system to validate the credentials of a selected user. The APSTOKEN is actually a series of numbers and characters created by Crystal Enterprise when a business user logs on and facilitates license management by keeping track of which users are logged on at any given time. The Crystal Enterprise user guide will need to be consulted to fully understand how to access and use the APSTOKEN.

http://server/crystal/enterprise/viewrpt.cwr?id=510&apstoken=APSName:A5I5

APSUSER, APSPASSWORD, APSAUTHTYPE

The other method that allows Crystal Enterprise to authenticate users is with the APSUSER, APSPASSWORD, and APSAUTHTYPE commands. These commands allow the passing of the necessary values to authenticate the business user against the Crystal Enterprise system database.

http://server/crystal/enterprise/viewrpt.cwr?id=510&apsuser=Administrator&apspassword=pwd123&apsauthtype=secEnterprise

More than simply providing secure access to Crystal Reports, Crystal Enterprise provides a comprehensive set of enterprise reporting features, including those highlighted in Tables 23.2 and 23.3. Although a detailed description of Crystal Enterprise features is beyond the scope of this book, additional system features and information can be found on the Crystal Decisions Web site. Crystal Enterprise is the Web distribution system that should be used whenever reports are mission critical, used when there is a large business user or report base, or used when security, personalization, or report scheduling are required.

Programmatic Report Distribution Using RDC or RAS

Crystal Decisions provides two software developer kits that enable report sharing via windows and Web-based applications. Both the RDC and RAS object models are available in the Developer or Advanced editions of Crystal Reports v9. RAS is also available in the Professional Edition. Both object models provide access to advanced Crystal Report capabilities for integration into custom developed applications.

The RDC components are fully compatible with the Microsoft Component Object Model (COM) and will be familiar to developers acquainted with previous versions of Crystal Reports. The RDC functionality can be accessed from any language that is COM-compatible Visual Basic, Active Server Pages using VBScript or JavaScript, C++, Delphi, or the Microsoft Web Development Environments (InterDev or FrontPage). Three drawbacks to using the RDC in your Web applications are: (1) it must be present on your Web server to operate, (2) it is single threaded, and (3) it must run in process on your Web server. These three factors lead to challenges when trying to scale an application, and RDC-based applications do not provide a simple migration path to Crystal Enterprise. Because of these reasons, the RDC is targeted toward use in desktop applications only.

The RAS object model was created to address these concerns and has been designed to be multithreaded and server- based. Additionally, the RAS has been designed as a seamless component of the Crystal Enterprise architecture, providing developers with a smooth migration path from this server to large-scale deployment on Crystal Enterprise Professional. The final vote to support using RAS over RDC is that RAS has been designed to be both COM and Java compliant. These parallel versions of the object model access the same Crystal Reports functionality and open up the power of Crystal Reports and Crystal Enterprise to the Java development community. In summation, the arguments for using RAS over RDC in custom application design are

  • It is multithreaded.

  • RAS is server based (does not need to reside on a Web server).

  • It integrates seamlessly into the Crystal Enterprise framework.

  • It is scaleable.

  • The RAS object model will be available in both COM and Java formats.

The next hour discusses the RDC and RAS components, as well as other Crystal Reports development aspects, in more detail. Whatever approach you select to distribute your Crystal Reports files, it is important to keep these in mind as options for your initial foray into Web distribution of your Crystal Reports.



Sams Teach Yourself Crystal Reports 9 in 24 Hours
Sams Teach Yourself Crystal Reports 9 in 24 Hours
ISBN: B003D7JUVW
EAN: N/A
Year: 2005
Pages: 230

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net