(Base One logo) .NET database and distributed computing tools

Presentation Quality Reporting & Graphing
with Crystal Reports and Pinnacle Graphics
 

BFC (Base/1 Foundation Component Library) includes libraries for generating presentation-quality output with two of the premier third-party tools for producing reports and graphs, Seagate Crystal Reports and Pinnacle Graphics Server. In addition to these integrated tools, of course, BFC allows you to work with any of the numerous other add-ons for reporting and graphing available for the Visual C++ environment.

Seagate Crystal Reports is the leading desktop query and report writer, with powerful data analysis capabilities and numerous report type options. BFC's Crystal Report Writer classes assist you in writing custom Crystal Reports DLLs as well as running reports and passing parameters to them.

Reports may exist on the local machine, on the network, or across the Internet. The Report classes are designed to communicate either directly with the Crystal Print Engine or indirectly through the Crystal Web Report Server. Using BFC you can build Internet applications that perform high quality printing and handle very large reports, while under high security control.

With BIS (Base/1 Internet Server), you can quickly create efficient, Rich Client Windows applications that run Crystal reports on data in Microsoft, Oracle, IBM, Sybase, and MySQL databases - accessed either locally or remotely. Users across the Internet can generate great looking, printable reports in response to queries about specific, detailed database information. Report pages are broken down properly, with headers, footers, page numbers, accurately placed images, etc. This contributes to a highly polished appearance, avoiding the fragmented look caused by wrapped lines and improperly split images that result from printing from a web browser. Users also have the option of exporting reports into files formatted for Microsoft Excel or Word.

The BFC programming tools make it easy to impose a high level of security, even while viewing reports across the Internet. For example, users can be grouped according to security rights, with certain reports being off-limits to some users and other reports filtered automatically so that only the proper subset of data is viewable.

Samples and classes for working with Crystal Reports

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
Sample Report through Crystal Report API


Using Crystal Reports across the Internet

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
Sample Report through Crystal Web Report Server


Using BFC's Report Base Class - clsRptBase

In order to add basic reporting functionality to your project you need to

  • Instantiate clsRptBase
  • Call InitRpt()
  • Call Print()

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:

  • SetFormula - to set or change formulas recalculated for each record
  • SetOneTimeFormula - to set formulas calculated once before records read
  • SetSelFormula - to set or change the record selection formula (criteria, WHERE clause)
  • SetNthSortField - to set or change sort fields (e.g. index keys)
  • SetGrpCondition - to set or change report group conditions

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:

  • AlterFormula - to set formulas used in your report
  • AlterTblNam - to adjust the table (record type) used in the report
  • AlterSelFormula - to provide a record selection criteria
  • AlterGrpInfo - to provide custom report options
  • AlterRptOpts - to supply custom report options
Note - Subreports:
clsRptBase supports a subreport within a report. (The Batch reports are examples. They contain a subreport for handling the listing of multiple job dependencies for a given batch job.)

BFC's Graph Library

Sample Graph Screen
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.


Get started fast with the premier presentation tools

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.)
 

Order BFCProgrammers - see for yourself!
Order BFC
(includes lots of Crystal & ASP samples)

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