![]() |
.NET database and distributed computing tools |
|
|
|
The Base/1 Foundation Application (B1_App.exe) comes with complete samples of the use of Crystal. Numerous real world examples of how to get things done using Crystal, both inside the corporate LAN and across the Internet, are included. Reports for the Data Dictionary, Batch Processing System, and the BFC Programmer's Reference Manual are all good Crystal examples that you can use as models for your own reports. You do not need to have Crystal Report Writer installed to run these reports because BFC comes with the necessary Crystal runtime DLLs. (However, you do need to purchase Crystal Reports if you want to use Crystal to generate new reports, for example, on your own data, because you'll need to create new .rpt files). |
All of BFC's built-in reports are created through BFC's Report base class (clsRptBase), which you can also use for writing your own reports (if you have Crystal Reports). The clsRptBase class is designed to communicate with the Crystal and encapsulate all of its internal complexity. In addition to supplying many extra functions specifically for working with Crystal Reports, BFC gives you additional help on converting from Oracle ODBC to Direct API and adding sub-reports to a Crystal report. The Report Base class (clsRptBase) simplifies running Crystal reports and passing complex report parameters to them. Reports operating through clsRptBase may reside on the local machine, on the network, or across the Internet. |
Sample Report through Crystal Report API
Your application's code does not have to change to work for both 2-tier (client/server) as well as 3-tier Internet applications using BIS (Base One Internet Server). The Report base class, clsRptBase, is designed to communicate either directly to the Crystal Print Engine or indirectly through the Crystal Web Report Server. When invoked against a database across the Internet, clsRptBase uses the MS Web Browser ActiveX control to communicate with the Crystal ActiveX control (.OCX). In any case, Crystal errors and associated messages are cleanly captured and displayed. Running through Crystal's ActiveX control makes it possible to do high quality printing from data on the other side of the Internet. As opposed to printing directly from a browser, report pages can be broken down properly, with headers, footers, page numbers, properly placed images, etc. |
Very large reports are practical because the Crystal Web Report Server sends pages across the Internet on demand (as opposed to all at once). Reports are displayed using a Crystal ActiveX control that is downloaded by the MS browser control the first time it's needed. (With Netscape Navigator, a Java applet is downloaded instead to display reports, but we have found that this mechanism works either partially or not at all.) The programming interface of clsRptBase remains the same even while viewing reports across the Internet. Thus the full security features of the Database and Screen libraries, such as Security Rules, logon/password verification, and automatic return of the user's Security Group and User Group codes, are available for controlling who sees which reports and how they can be run. For example, report menu items and buttons can be enabled/disabled automatically, and data in the reports can be filtered automatically based on the current user's Security Group or User Group. |
Sample Report through Crystal Web Report Server
In order to add basic reporting functionality to your project you need to
The Print() function will automatically display the dlgPrintOptions() dialog responsible for selecting the report output destination and other options. clsRptBase's functions work regardless of whether the database is across the Internet or local. There are functions to set parameters passed to the Crystal Report engine, such as:
|
clsRptBase has virtual functions that you override to provide the calls needed to replace default behavior of the Crystal engine for the template, such as:
|
Sample Graph Screen
BFC comes with a Graph Library (B1Gph) for creating graphs with Pinnacle Graphics Server. The BFC graph classes permit
BFC-derived applications to
access the Pinnacle Graphics run-time library, which provides high quality graphic
display. Since its release in 1990, Graphics Server has set the
industry standard for high-end data analysis and presentation.
Graphics Server makes it possible to integrate dynamically generated graphs, charts, and statistics into Windows and web applications. The software package offers a comprehensive range of graph and chart types, plus statistical functions, and it supports both client-side and server-side graphing. Rich Client applications make direct use of the Graphics Server API on the client-side. Server-side graphing is best for web applications and has the advantage of not requiring a client-side control or executable, i.e. all the graphing is done on the web server. Graphics Server supports PNG and JPEG image formats, making it 100% browser independent, hence it can display graphs on Windows, Macs, and other computers. Graphics Server also supports hot links within a graph for point-and-click access to secondary charts and statistical breakdowns. Apart from display and printing, graphs and charts can be saved to disk in WMF, BMP, JPEG, and PNG formats. Images can also be sent to the clipboard for pasting into other programs, such as Microsoft Word, Microsoft Excel, Adobe Photoshop, etc. |
Applications created with Pinnacle Graphics Server can be distributed royalty free - including server-side Web graphing. Graphics Server is currently being used in software packages from industry leaders like Microsoft, Borland, Novell, and Intel and is trusted by over one million developers worldwide. The Base/1 Foundation Application has a sample of using the Graph classes with the Database Library. As an illustration, the graph view launched runs through the data dictionary and counts the number of indexes and fields (columns) in each record type (table) and displays a scrollable bar chart. Note that to use the Graphics Server APIs in your application, you must buy the Graphics Server package from Pinnacle. For more information on licensing of Graphics Server, see the Pinnacle license. BFC has a tight integration with Graphics Server and comes with a sample graph and the required DLLs and libraries for Graphics Server. Running this example does not require a license. |
BFC ships with the runtime Crystal Reports and Pinnacle Graphics Server executables. All of the required headers, libraries, and DLLs are installed as part of BFC. A Graphics Server help file (for the end-user graphing interface options) is also included. Crystal DLLs are copied to application directories, as needed. | It's easy to exclude the Crystal Reports and/or the Pinnacle Graphics Server modules. (If the constant ENABLE_Rpt is commented out, then the entire reporting module is excluded. Similarly, if ENABLE_Graph is commented out, then the graph modules are excluded from your application.) | |
|
BFC | Visual Studio | Database Technology | Distributed Computing | Intro to Crystal Reports
|
|||||||
Home | Products | Consulting | Case Studies | Order | Contents | Contact | About Us |
|
|||||||
Copyright © 2012, Base One International Corporation |