- •Seagate Crystal Web Reports Server Overview
- •What is the Web Reports Server?
- •Who should use the Web Reports Server?
- •Web Reports Server Features
- •New Features in Version 7
- •The Web Reports Server vs. Active Server Pages
- •Sample Web Sites
- •Implementing the Web Reports Server
- •Choosing a Web Reports Server
- •System Requirements
- •Installing the Web Reports Server
- •Confirming Correct Installation
- •Virtual Directories
- •Creating a Web Site
- •For More Information
- •Crystal Web Reports Server Administration
- •The Web Reports Server Configuration Application
- •Page Server Tab
- •Image Server Tab
- •Report Exporting Tab
- •Server Mappings Tab
- •Report Viewing Tab
- •The Page Server and the Image Server
- •Smart Navigation
- •Drilling Down on Data
- •Database Location
- •Web Reports Server Commands
- •The Crystal Web Reports Server Command Expert
- •Constructing Report Requests
- •Changing Selection Formulas in Web Reports
- •SQL and ODBC Data Sources
- •SQL Stored Procedures and Parameter Fields
- •Report Exporting
- •Refreshing Web Report Data
- •Web Reports Server Architecture
- •The Web Reports Server Extension
- •The Seagate Crystal Web Image Server
- •The Seagate Crystal Web Page Server
- •Report Processing
- •Job Manager Overview
- •Seagate Crystal Report Engine Automation Server
- •Visual InterDev Design-time ActiveX Control
- •Using an Existing Report
- •Building a Report at Runtime
- •Editing Active Server Pages
- •Customizing the Crystal Smart Viewer
- •Modifying the Report
- •Session Timeout
- •Sample Web Site
- •Crystal Smart Viewer Overview
- •Features of the Crystal Smart Viewers
- •Printing from the Crystal Smart Viewers
- •Using Crystal Smart Viewers in Applications
- •Crystal Smart Viewer for HTML
- •Limitations of HTML Reports
- •Crystal Smart Viewer for Java
- •Adding the Viewer to a Web Page
- •Crystal Smart Viewer for ActiveX
- •AuthentiCode Certification
- •Adding the Viewer to a Web Page
- •Downloading the Viewer from the Server
- •ActiveX Viewer Example
- •Introduction to the Crystal Report Engine
- •Before using the Crystal Report Engine in your application
- •Using the Crystal Report Engine
- •Crystal Report Engine API
- •Declarations for the Crystal Report Engine API (REAPI)
- •Using the Crystal Report Engine API
- •The Print-Only Link
- •The Custom-Print Link
- •Working with Parameter Values and Ranges
- •Working with section codes
- •Crystal Report Engine API variable length strings
- •Crystal Report Engine API structures
- •Working with subreports
- •Changing report formats
- •Exporting reports
- •PEExportTo Overview
- •PEExportOptions Structure
- •Considerations when using the export functions
- •Handling Preview Window Events
- •Distributing Crystal Report Engine Applications
- •Additional Sources of Information
- •Using the Crystal Report Engine API in Visual Basic
- •When to Open/Close the Crystal Report Engine
- •Embedded Quotes in Visual Basic Calls to the Crystal Report Engine
- •Passing Dates/Date Ranges in Visual Basic using the Crystal Report Engine API Calls
- •Identifying String Issues in Visual Basic Links to the Crystal Report Engine
- •Hard-coded Nulls in Visual Basic User Defined Types
- •Visual Basic Wrapper DLL
- •Crystal ActiveX Controls
- •Adding the ActiveX Control to your Project
- •Using the ActiveX Controls
- •Upgrading from the Crystal Custom Control
- •Crystal Report Engine Automation Server
- •Adding the Automation Server to your Visual Basic Project
- •Using the Automation Server in Visual Basic
- •Object Name Conflicts
- •Viewing the Crystal Report Engine Object Library
- •Handling Preview Window Events
- •Distributing the Automation Server with Visual Basic Applications
- •Sample Applications
- •Active Data Driver
- •Data Definition Files
- •Using the Active Data Driver
- •Creating Data Definition Files
- •Using ActiveX Data Sources at Design Time
- •Crystal Data Object
- •CDO vs. the Crystal Data Source Type Library
- •Using the Crystal Data Object
- •Crystal Data Object Model
- •Crystal Data Source Type Library
- •Creating a new project and class
- •Adding the type library
- •Implementing the functions
- •Passing the CRDataSource object to the Active Data Driver
- •Crystal Data Source Projects
- •Grid Controls and the Crystal Report Engine
- •Bound Report Driver and Bound Report Files
- •Crystal ActiveX Control Properties
- •Creating a Bound Report using the Crystal ActiveX Control
- •Creating a Formatted Bound Report
- •Creating a Formatted Bound Report at Runtime
- •Sample Application
- •ActiveX designers
- •The Report Designer Component vs. Seagate Crystal Reports
- •Data Access
- •No drag and drop between reports – use copy and paste
- •Conditional Formatting
- •Preview Window
- •Pictures
- •Guidelines
- •Subreports
- •The dual formula environment
- •Application Distribution
- •Installing the Report Designer Component
- •System Requirements
- •Installation
- •Using the Seagate Crystal Report Designer Component
- •Adding the Report Designer Component to a Project
- •Selecting Data
- •The Report Expert
- •Adding the Smart Viewer
- •Running the Application
- •CrystalReport1 - The Report Designer Component
- •CRViewer1 - The Smart Viewer Control
- •The Code
- •Report Packages
- •Working with data
- •ADO and OLEDB
- •Connecting to data with ADO
- •Connecting to data with RDO
- •Connecting to data with DAO
- •Data Environments
- •Data Definition Files
- •Report Templates
- •ODBC, SQL, and PC data sources
- •Report Designer Overview
- •Introduction to the Report Designer Component
- •Report Designer Architecture
- •Report Designer Object Model Programming
- •Report Designer Object Model Introduction
- •Obtaining a Report object
- •Displaying the report in the Smart Viewer
- •Setting a new data source for the report
- •Using ReadRecords
- •Passing fields in the correct order
- •Working with secure data in reports
- •Handling the Format event
- •Changing the contents of a Text object
- •Changing OLE object images
- •Working with Sections
- •Working with the ReportObjects collection
- •Working with the FieldObject object
- •Working with the SubreportObject object
- •Working with the Database and DatabaseTables objects
- •Working with the CrossTabObject object
- •Exporting a report
- •The Application object
- •Report events
- •Microsoft Access Sessions
- •Programmatic ID
- •Report Distribution Considerations
- •Distributing reports as part of the application
- •Saving reports as external files
- •Saving data with reports
- •VCL Component Overview
- •Installation
- •Delphi 2
- •Delphi 3 & 4
- •C++ Builder 3
- •Programming Overview
- •Introduction to the Object Inspector
- •Changing Properties in the Object Inspector
- •Changing Properties at Runtime
- •Delphi Programmers introduction to the SCR Print Engine
- •Dealing with SubClass Objects
- •Consistent Code
- •Using the Retrieve method
- •Working with subreports
- •Other Guidelines
- •Programming Tips
- •Always Set ReportName First
- •Discard Saved Data
- •Verify Database
- •Connecting to SQL Servers
- •Changing Tables & Formulas
- •Changing Groups & Summary fields
- •Using the Send methods
- •Using the JobNumber property
- •TCrpeString
- •Introduction
- •TCrpeString VCL Properties
- •Using the TCrpeString
- •Using Variables with Formulas
- •Introduction
- •Examples
- •About Section Names
- •Introduction
- •Methodology
- •StrToSectionCode
- •C++ Builder 3
- •Introduction
- •Code Syntax
- •Additional Code Examples
- •Known Problems
- •Retrieving ParamFields from a Subreport
- •DialogParent and Temporary Forms
- •Technical Support
Changing report formats
When sending reports to a preview window using PEOutputToWindow, Volume 2, Chapter 1, you should always avoid making any formatting changes to a print job once you call PEStartPrintJob, Volume 2, Chapter 1. If the first page of a report has been displayed in the preview window, and you make formatting changes to the print job, subsequent pages of the report, if requested, may appear formatted differently than the first page. Depending on the changes made, trying to change report formatting after calling PEStartPrintJob can even cause errors in the Crystal Report Engine.
To avoid such formatting problems, you should get in the habit of formatting the report before starting the print job with PEStartPrintJob. Adding a routine to monitor job status using PEGetJobStatus, Volume 2, Chapter 1, can also help avoid conflicts. If you need to display the same report with different formatting options, create two separate print jobs, format each separately, and start each separately.
Exporting reports
The following topics are discussed in this section:
PEExportTo Overview, Page 95
PEExportOptions Structure, Page 95
Considerations when using the export functions, Page 97
Using the Professional Edition of Seagate Crystal Reports, you can give your applications the ability to export reports in a number of word processor and spreadsheet formats, and in a variety of popular data interchange formats as well.
The program includes two export functions, PEExportTo, Volume 2, Chapter 1, and PEGetExportOptions, Volume 2, Chapter 1. PEExportTo can be used by itself or in conjunction with PEGetExportOptions.
●Use PEExportTo by itself if you want your application to export reports in a fixed format to a fixed destination. Use this alternative, for example, if you want to preset the format and destination for a report and have the application export the report according to your specifications in response to user input.
●Use PEExportTo in conjunction with PEGetExportOptions to export reports in the format and destination your user selects from the Export dialog box at Print time.
PEGetExportOptions can only be used in conjunction with PEExportTo.
Crystal Report Engine |
94 |
PEExportTo Overview
The PEExportTo, Volume 2, Chapter 1 function uses a structure, PEExportOptions, Volume 2, Chapter 1, as part of its argument list. This structure passes format and destination data to the function.
When using the PEExportTo function by itself, you hard code the format and destination data into the structure. Then, when you issue a call to PEStartPrintJob, Volume 2, Chapter 1, the program exports the report using the format and destination you specified in the code.
●Most of the format and destination data that you need to enter can be taken from the table in the PEExportTo topic.
●To hard code an export file name or e-mail header information, you will have to pass a second structure as an argument to the PEExportOptions structure. This second structure is defined in the *.h file that corresponds with the destination DLL you have selected.
When using the PEExportTo function in conjunction with the PEGetExportOptions function, you run the PEGetExportOptions function first to:
●retrieve the format and destination data that the user specifies in the Export dialog box, and
●pass that data to the PEExportOptions structure (again, part of the PEExportTo argument list).
Then, when you issue a call to PEEnableEventInfo, Volume 2, Chapter 1, the program exports the report using the format and destination specified by the user.
PEExportOptions Structure
struct PEExportOptions
{
WORD StructSize;
//the size of the structure. Initialize to sizeof PEExportOptions char formatDLLName [PE_DLL_NAME_LEN];
//Each export format is defined in a DLL. This is the name of the
//DLL for the format you select. From table in PEExportTo topic.
//Requires a null-terminated string. Does not need to include
//drive, path or extension. For example, uxfsepv is an example of
//a valid formatDLLName.
DWORD formatType;
//Some DLLs are used for more than one format. Enter the
//appropriate value from the table under PEExportTo. void FAR *formatOptions;
//Some formats offer additional options (see table in the
//PEExportTo topic). You can set this element to 0. Then, If the
//DLLs require more information, they will prompt the user
//for it. To hard code this information, see the note immediately
Crystal Report Engine |
95 |
// following this structure.
char destinationDLLName [PE_DLL_NAME_LEN];
//Each export destination is defined in a DLL. This is the name of
//the DLL for the destination you select. From table in PEExportTo
//topic. Requires a null-terminated string. Does not need to
//include drive, path or extension. For example, uxddisk is an
//example of a valid destination DLLName.
DWORD destinationType;
//At the present time, each DLL implements only one destination.
//You must specify a type here, nonetheless, because the DLL may
//implement more than one destination someday. See the table under
//PEExportTo for values to enter here.
void FAR *destinationOptions;
//Some destinations offer additional options (see table in the
//PEExportTo topic). You can set this element to 0. Then, If the
//DLLs require more information, they will prompt the user for
//it. To hard code this information, see the note immediately
//following this structure.
WORD nFormatOptionsBytes;
//Set by 'PEGetExportOptions', ignored by 'PEExportTo'. Both
//functions use the same structure. PEGetExportOptions uses this
//information in communicating with the application. The
//application needs to know how many options bytes are being
//returned because it may need to copy the options. PEExportTo
//expects a filled in structure and does not need the byte
//information because it is not going to copy the options. It uses
//only a subset of the structure that does not include byte
information.
WORD nDestinationOptionsBytes;
//Set by 'PEGetExportOptions', ignored by 'PEExportTo'. See
//comments for nFormatOptionsBytes above.
};
NOTE: You may choose to hard code the data for formatOptions and destinationOptions. You can set the formatOptions and destinationOptions elements to 0 as indicated. If the DLLs require more information than this, however, they will prompt the user to include more information. To hard code this information, you must define and fill in a structure of the appropriate kind. See the header file for the specified DLL for examples. Once the structure is defined, set the formatOptions or destinationOptions element to the address of the structure. Once PEExportTo returns or finishes, deallocate the formatOptions and destinationOptions structures. You should also deallocate the PEExportOptions structure once PEExportTo returns.
Crystal Report Engine |
96 |