About the Sample Code

Take advantage of the sample code included in this folder to speed up the process of integrating reporting in your Windows and web applications. By using them as examples or copying the code directly, you’ll find out just how easy it is to pack the powerful reporting functionality of Seagate Crystal Reports into your applications.

The sample code is categorized by programming language --Visual Basic, Visual C++, Delphi and Web-based. See the sample code listing, which starts on page 2, for a description of each sample. 

How to get started?

New to Seagate Crystal Reports
Even if you’re just learning to integrate reporting in your applications, you’ll find most of the sample applications straightforward and easy to understand. The “Simple Demo” in the Visual Basic folder is the best place to start. 

Web developers
Check out the sample ASP pages to find out how to integrate the Report Designer Component into your internet/intranet web site.

Windows developers 
Many of the new features in Seagate Crystal Reports 8 are demonstrated in the sample applications. If you’re looking for more sophisticated samples, be sure to take a look at “First Class Hotels” in Visual Basic folder and “Pro Athlete Salaries” in both Visual Basic and Visual C++ (Cpp) folders. If you are a user of Crystal Report Engine API, Crystal ActiveX Control or Crystal Report Engine Automation Server, please note that all the Visual Basic and Visual C++ samples and most of the web samples are written for the Report Designer Component. Visit the Seagate Software Community Library at http://community.seagatesoftware.com/library to learn all about migrating your applications to use the Report Designer Component.

Why use the Report Designer Component?   
The Report Designer Component (RDC) offers a dual interface COM component, which is the most advanced technology available for developers.  The Report Designer Component is an ActiveX Designer that packs the reporting power of Seagate Crystal Reports. Developers creating applications in popular environments such as Visual Basic, Visual C++, Visual InterDev and Office (VBA) can use the RDC to efficiently create the most powerful reporting functionality in their applications

Seagate Crystal Reports 8 supports the older integration methods (32-bit only). However, we recommend using the RDC, the newest and best reporting technology available, to create the most efficient and powerful reports that support the entire range of functionality available within Seagate Crystal Reports today.

What are the sample application requirements? 
Be sure to use Visual Basic 6.0 or Visual C++ 6.0 to view the Visual Basic or Visual C++ sample applications. As well, all sample code works with version 8 of the Report Designer Component.  Please visit the Seagate Software Community http://community.seagatesoftware.com/support to get more compatibility information.

Where can I get more sample applications?
Get more samples from the Seagate Software Community at http://community.seagatesoftware.com/samples 

Feedback
E-mail us at feedbackscr@seagatesoftware.com to give feedback and suggest new samples.

Sample Code Listing

Folder and Name				Description

\Visual Basic\

Samples showing New Features in Seagate Crystal Reports 8
ADO Connection Methods	
New methods of adding ADO connections to reports.

Change Runtime Location of OLE Object Demo 
	Sets the location of an OLE object at runtime using the SetOleLocation command.

No Data in Report Event	
Shows the new "No Data" Event.

Printer Settings	
Changes Printer Settings at run-time.

Report Creation API	
Demonstrates the use of the Report Object Creation API Features.

Report Variables	
Simple Seagate Crystal Reports demonstration of Report Variables.

Report Expert	
Demonstrating the use of the new Crystal Report Expert. 

Search and Select Experts	
Programmatically controlling the Search and Select Experts.

Unbound Fields	
Demonstrates one way to use Unbound Fields.

Viewer Runtime Options	
Manipulates new properties of the Crystal Reports ActiveX Viewer at Runtime.

Simple Samples
Employee Profiles	
Run-time report manipulation through VB code. 

Inventory Demo	
Intermediate level, run-time report manipulation through VB code. 

Simple Report	
Create reports and view them using Visual Basic. This is a beginner level sample.

Viewer	
Manipulating the Smart Viewer through VB code at run-time. This is a intermediate level sample.

Advanced Samples
First Class Hotels	
A small hotel reservation system for a fictional company called First Class Hotels. The sample demonstrates a number of features new to version 8, and advanced uses for some existing features.

Load Picture	
Run-time report manipulation through VB code showing how pictures can be loaded into a report at run-time. 

Pro Athlete Salary Report	
New Report Creation API features  

Xtreme Mountain Bikes	
Advanced techniques for integrating reports into an application.

\Cpp\

Pro Athlete Salary Report	
Advanced Visual C++ and Seagate Crystal Reports Demonstration of the new Creation API features.

\Delphi\
Crystal Reports Print Engine demonstration for Delphi 2.0 or higher. Contains sample code for the commonly used API calls. This is not an RDC sample.

\Web\Web Component Server\

HTML and ASP pages that allow the user to select the report to view, the viewer to display the report, and the web report server used to process the report.
\Web\Active Server Pages\

Unbound Fields Sample	
Creates a report at runtime using unbound fields. The sample allows the user to select the order that the fields appear, the group, and group sort direction.

ADO Recordset Sample	
Pass an ADO recordset to a report.

Report Exporting Sample	
Exports a report to a variety of different file formats and delivering that file to the browser.

Parameter Field Demo	
Pass a parameter field value to a report.

Selection Formula Demo	
Pass a record selection formula to a report at runtime.

Sort Fields Demo	
Modify an existing SORT field in the report and add a new Sort field to the report at runtime.

\Web\Java\

Report Viewer JavaBean with Sun Java Plug-in	
Load the Java Viewer applet using the Sun Java Plug-in. Remember to set up the system classpath before running this applet. 

Report Viewer JavaBean with browser JVM	
Load the Java Viewer applet using the browser’s Java Virtual Machine.