WHITE PAPER ActiveX Report Rendering How to Achieve Best Results When Viewing or Printing Reports CONTENTS 1 Executive Summary 2 Printers and Report Rendering 3 Configuring the Crystal Reports Enterprise Page Server 4 Report Design 5 International Considerations 6 Diagnostic Support 7 About Business Objects, an SAP company Executive summary The Crystal Reports ActiveX viewer from Business Objects, an SAP company, can accurately print and view reports. It uses the same technologies as the Crystal Reports report designer to render text. And due to the accuracy of text layout, it also supports report design features such as text clipping and field objects. Crystal Reports software produces charts in vector format, which the ActiveX viewer is able to render with equivalent quality while viewing and printing. In order to ensure accurate results, the same type of printer resource must be available to the server and the viewer. Features such as text and field object clipping can only be safely enabled when it is guaranteed that the rendered results match the layout of the original report. Misleading results can lead to incorrect information. For example, inaccurate financial results clippings could lead to incorrect business decisions. ActiveX printing (a feature of the HTML viewers) uses the ActiveX viewer core printing technology. This technology is available to server developers through direct use of the PrintControl object in Crystal Reports version 10 and through the component object model (COM) implementation of the Report Client Document object in the Crystal Reports XI release and beyond. In this document, we discuss how you can achieve the best results when viewing and/or printing reports. Author: Ian Treleaven, Senior Software Engineer Contributors: MaryLouise Meckler and Pam Seale Audience: Technical Administrators
Printers and Report Rendering All Crystal Reports viewers, including the Crystal Reports ActiveX viewer, display report pages that are generated by the print engine. The print engine processes the report data and puts the appropriate information on each page. The viewer then displays these pages. Most importantly, the content, layout, and general information format is determined by the print engine in the context of an output device. The output device context can be that of a printer or a generic display device. The viewer displays the page content as accurately as possible. However the page has already been formatted using the capabilities of an output device. The ActiveX viewer takes extra steps to ensure use of the correct output device, and to display text as close as possible to what the resulting printed page would look like on that device. The printer management, font management, and text layout features of the print engine are replicated inside the ActiveX viewer to make the output as accurate as possible. Text is displayed on screen by the ActiveX viewer using fonts that approximate the output on the printer. This has the benefit of providing a preview of the printed output, as well as providing a best match to the formatting done by the print engine. The challenge is in matching the output device used by the print engine and the printers available to the client machine. In some circumstances, the print engine cannot access a printer and must use the (relatively low resolution) display device instead. The initially selected printer is chosen using the following criteria: User default printer with the same device driver name Any printer available that has the same device driver name The user s default printer Note that the user can choose to print to a different printer. Results may vary depending on how closely the printers match in capability. Report features such as field and object clipping are enabled only when the printer device driver names match, since there is no guarantee that the output formatted for one printer will match when printed on another printer. This is done for data integrity purposes so that field widths specified in the report design precisely match the field width in the output. Allowing field clipping only for matching printer device names ensures that numeric values will not be truncated by a rendered field that is not as wide as the report designer intended.
Configuring the Crystal Reports Enterprise Page Server The Enterprise Page Server service generates report pages for viewers. The configuration of this service is particularly important because by default, a service cannot create a printer device context. The service must be interactive or log on using a different account in order for it to access the printers referenced by reports in the system. See the configuration guidelines for further information and instructions. When the Page Server is unable to create a printer device context, it formats the page using the display device context, which is typically 96 dpi and much less than a typical printer s resolution. This greatly affects page formatting and results in features such as field clipping not being enabled when viewed or printed by the ActiveX viewer.
Report Design Crystal reports typically have a default printer associated with them the report designer s default printer. This is important to keep in mind when viewing and printing reports. This same type of printer needs to be available to client machines to achieve best results. Report designers should ensure reports are set up to use commonly available printers. One available option for a report is to not use a printer. In the printer setup of the Crystal Reports designer, you can choose No Printer. Reports are formatted using the display device of the server instead of a printer. This method may not have desirable printing results and will not have advanced features such as field clipping enabled. See the Crystal Reports designer documentation for more information on selecting printers.
International Considerations Paper sizes and multi-language text are two areas that require consideration when designing, printing, and viewing reports. In an enterprise deployment, it is possible to design and format reports for a paper type that is not available at the client where final rendering occurs (to screen or printer). By default, the Crystal Reports designer sets report margins to match the printable area supported by the selected printer. The ActiveX viewer can help in situations where the report is, for example, in letter format and needs to be printed to A4 paper. If the report content, as defined by the margins, can fit in the printable area of the selected printer, the ActiveX viewer can adjust the position of the content on the page in order to fit. Report designers need to adjust the report margins to accommodate the common area of the required paper types. The ActiveX viewer uses the same Microsoft Uniscribe text processing engine as the Crystal Reports designer and print engine. It can render Unicode text in multiple languages on the same page, in accordance with the capabilities of the Crystal Reports designer. Be sure to choose fonts that users will have available to them. The ActiveX viewer is not always able to substitute fonts if a machine doesn t have the same font as required by the report.
Diagnostic Support You can turn on diagnostic support in the ActiveX viewer through a registry key to display information about the pages it receives from the report engine. It will display the printer name, printer port, and most importantly, the printer driver name. If the special printer driver name DISPLAY is indicated, it is a sign that either no printer was specified in the report, or the Enterprise Page Server was unable to create a printer (an indication that it is not configured as an interactive service). The registry key varies by version. For version 10, only the more recent patches contain diagnostic support. At the key path indicated, create a DWORD entry named DisplayPrinterInfo with the value 1. Version 10 Registry Key: HKEY_CURRENT_USER\Software\Crystal Decisions\10.0\Components\ ActiveX Viewer Version 11 (XI) Registry Key: HKEY_CURRENT_USER\Software\Business Objects\Suite 11.0\Components\ ActiveX Viewer Note that this diagnostic support is not in the ActiveX Print Control.
ABOUT BUSINESS OBJECTS, An SAP COmpany As an independent business unit within SAP, Business Objects transforms the way the world works by connecting people, information, and businesses. Together with one of the industry s strongest and most diverse partner networks, the company delivers business performance optimization to customers worldwide across all major industries, including financial services, retail, consumer-packaged goods, healthcare, and public sector. With open, heterogeneous applications in the areas of governance, risk, and compliance; enterprise performance management; and business intelligence; and through global consulting and education services, Business Objects enables organizations of all sizes around the globe to close the loop between business strategy and execution.
businessobjects.com 2008 Business Objects. All rights reserved. Business Objects owns the following U.S. patents, which may cover products that are offered and licensed by Business Objects: 5,555,403; 5,857,205; 6,289,352; 6,247,008; 6,490,593; 6,578,027; 6,831,668; 6,768,986; 6,772,409; 6,882,998; 7,139,766; 7,299,419; 7,194,465; 7,222,130; 7,181,440 and 7,181,435. Business Objects and the Business Objects logo, BusinessObjects, Business Objects Crystal Vision, Business Process On Demand, BusinessQuery, Crystal Analysis, Crystal Applications, Crystal Decisions, Crystal Enterprise, Crystal Insider, Crystal Reports, Desktop Intelligence, Inxight, the Inxight Logo, LinguistX, Star Tree, Table Lens, ThingFinder, Timewall, Let there be light, Metify, NSite, Rapid Marts, RapidMarts, the Spectrum Design, Web Intelligence, Workmail and Xcelsius are trademarks or registered trademarks in the United States and/or other countries of Business Objects and/or affiliated companies. All other names mentioned herein may be trademarks of their respective owners. August 2008 WP3017-B