Printing Crystal Reports – Architecture
Since printer driver dependency cannot be avoided, the goal of the report distributor is to design reports that accommodate dependency and still print consistently using different printer drivers. This Document describes Crystal Reports architecture and design considerations to allow for consistent report printouts in any environment.
The rendering of Crystal Reports is heavily dependent on installed printer drivers. In addition report design depends on a number of features that must be kept in mind by the report author in order to create a consistent looking report. The Document discusses report objects, printer dependencies, report sections, best practices and more.
Crystal Reports Architecture
The Crystal Reports architecture offers the ability to print consistent looking reports in different environments. In order to achieve consistent print output, the following points must be understood:
• How different objects are treated by the report engine.
• How different objects react and relate to each other.
• How report sections affect report objects.
• Results of formatting when applied to the report objects.
• Enhancements to Crystal Reports 2008 and above.
• Reports are no longer dependent on specific printers when using Dissociate Formatting Page Size and Printer Paper Size option.
Any report can only contain two basic report objects; OLE and text.
Any non text-based object in Crystal Reports is considered to be an OLE object. Examples of these include bitmapped images, graphs, lines, boxes and cross tab objects. Secondly, while text-based objects have a strong dependency on the printer driver and are thus sensitive to the printer driver changing, OLE objects do not share the same dependency and will print consistently even though the printer driver changes.
A text-based object in Crystal Reports is defined as any object that contains alphanumeric text such as String or Character fields; text objects (which contain text that you type and could also contain Memo fields and other String or Character fields); Memo fields; Numeric fields, and Formula fields. Different printer drivers can affect both the printing of text-based objects that make up a report and how these objects are positioned on a page.
Example: A text-based object references a printer driver that measures fonts differently than the driver that was used when the report was created. Because the report designer did not take the necessary steps to accommodate printer driver dependency, the printed report could include:
• columns of data no longer aligned
• inconsistent spacing
• truncated text
When a text-based object is placed on the report, the object has specific boundaries. The height of the object’s boundaries is always determined by Crystal Reports but is based on the height of the font. The height of the font is determined by the printer driver based on the font and font size selected. The width, however, is determined differently depending on the nature of the text-based object being worked with. For database fields that are not Memo fields, the width is initially determined by the width of the field, as defined in the database, and the average character width as provided by the font and font size selected. Consider a database field defined as a text field with a length of 35 characters. When the field is placed on the report design pane the width of the boundary will be 35 times the average character width of the font and font size as defined in the database. Suppose that the field was populated with 35 lower case e’s (which are slightly narrower than the average character width), the boundary would be wide enough to accommodate the entire record (35 e’s) and an additional three more letter e’s. If the field was populated with 35 lower case w’s (which are wider than the average character width), the boundary would only be wide enough to display 28 w’s and the remaining 7 would be truncated.
Why wouldn’t a field’s default size always be wide enough to accommodate the widest possible string of text? The example below shows that while the default field width is not wide enough to show all of the w’s, the text box at the top, which is the same font, font size and width as the text-based database fields below it, contains 49 characters and not 35. Remember that this is the initial default boundary width. The width can always be resized to increase or decrease the width as needed.
When inserting a Text Object, the default width of the text-based object is approximately 17 average character widths wide. Text objects will automatically expand as text is entered and/or database field is added. As with all other text-based objects, the width can be resized. The various Number fields, such as Double, Single, Integer, Long Integer and Byte all have different default widths. Once again, as with all other text-based objects, the width can be resized as needed. Whether the default widths are accepted or the text-based objects are resized, a problem could arise if the text inside prints right to the edge of the text-based object’s boundary. The report may look fine on the machine it was designed on. However, if the report is printed using another printer driver that measures the font wider, the length of the text grows but the object’s boundaries remain fixed. This results in the text being truncated or cut off.
While it would be reasonable to expect the objects should be designed to expand automatically as needed, this is not a workable solution. The reason for this is that the width of the report is finite, as defined by the paper width and the margins. If objects were allowed to expand as needed, then they could expand enough to fall outside of the left and/or right margins. Additionally if two objects were placed side by side an object allowed to expand automatically and without limit would either have to overprint its neighbor, or push it off the page. Neither option is optimal…, overprinting is not a solution. And allowing objects to push each other would necessitate considerations such as:
• What should happen if the boundary of a text-based object on line one of the report is not wide enough and needs to be expanded but on line two it is wide enough and does not need to change?
• What if the text-based object on the left is left aligned (the text will expand to the right) and the object on the right is right aligned (thus, the text will expand to the left)?
• Which object should get pushed over?
• Objects expanding automatically could also place columns of data out of alignment or out of place in the case of preprinted forms.
There are so many possible scenarios that it would be impossible to control object growth by adding additional “growth” options. If you completed the exercise at the beginning of this document, you have already experienced the problems that word processors and spreadsheet applications encounter.
Suggested Best Practices for Text-Based Objects
The numerous inconsistencies of different printer drivers can only be accommodated to a certain extent. There are two ways to do this.
1. If a text-based object is formatted to print on multiple lines (on the Format menu, click Format Field…select the Common tab and select the Can Grow option) and the text prints wider than the object, the text will wrap onto additional lines. This is not an effective solution for strings of text that do not have spaces in them, such as single words, because although the line will wrap, the text string will break at the boundary and then wrap. Below is an exaggerated example.
2. If adding additional lines to an object is not feasible, an alternative is to expand the boundary of the object so that it is a little wider than the widest block of text that the object will contain. There are many instances where the actual text in a database field is far less than the field is formatted to be. For example, a field is designed with a field size of 80 and the longest name in the database is 28 characters. When the field is first placed into the report the field will be 80 times the average character width, which is obviously wider than necessary. However, if you reduce the width of the field, do not reduce it so much that it is just barely long enough to accommodate the longest string of text. Instead, it is suggested that you make the field a little wider. Below is an exaggerated example.
It is generally recommended that the field width be increased by about 5%. Note that the effect of a wider font width will be more noticeable on a long String field, such as a product description, than on a small String field such as a 6-digit product code.
Memo fields and multi-line text objects
While text-based objects that are formatted to print on multiple lines follow the same design rules as other objects, they have an additional characteristic that must be considered. If the printer driver expands or contracts the spacing of the text, a text-based object formatted to print on multiple lines will not get its contents truncated. However, word wrapping could be different and in some cases the number of lines necessary to print the object may differ from the number required when the report was first designed. Unlike single line text-based objects, expanding the boundary width of the text-based object that will print on multiple lines to accommodate possible growth is not a viable option because the line width will just increase to the expanded boundaries. Since making the text-based object wider is not an option, the possibility that it will require less, the same, or more lines on different machines will have to be accommodated in the report design. This is how a text-based object will print when formatted to print on multiple lines. The number of lines the object requires when the printer driver measures the character spacing may be different for different drivers. In the example below, the text-based object on the right is the same as on the left except that its width has been expanded. Notice that the text in the object simply expands to the new width.
The next example shows how a text-based object will print when formatted to print on multiple lines. Notice the number of lines the object requires when the printer driver measures the character spacing differently.
Suggested Best Practices for Memo Fields & Multi-Line Text Objects
Management of the characteristics of multi-line text-based objects within a report will be included in the discussion of how the individual objects and sections work together. In some cases, when selecting a particular font size, word wrapping does not work. This may be because the printer driver does not understand that type of functionality.
Combining Text-based and OLE objects
Combining Text-based and OLE objects may create conditions such as lines and boxes printing out of place and thus objects printing over other objects on the same line resulting in reports no longer matching preprinted forms.
Characteristics of Report Sections in Crystal Reports
In all versions of Crystal Reports, a report consists of several sections such as the Page Header, Group Header, Details, Group Footer and Page Footer. In a new report, each section consists of at least one line. The default fonts for Fields and Text Objects determine the line’s height. When a text-based object is placed on a line, the line’s height is adjusted up or down so that the line is now high enough to accommodate that text-based object. If another text-based object is placed on the same line and its font size is larger than the first line, the line’s height is again adjusted to accommodate the second text-based object. Thus, the text-based object determines a line’s height with largest font on the line. All text-based objects are positioned on a line so that their base lines will all line up on any given line. This means that a text-based object cannot be placed between lines; it must be placed on a line. In the screen shots below, the figure on the left shows the Detail section with no objects inserted and a default line height of 12 points. When a database field is first placed on the report (center figure), the line’s height does not change because it is the default line height (12 points). If the text-based object’s font size is increased from 12 to 16 points, the actual height of the object (boundary) increases.
If the line height increases to accommodate the larger text-based object, then the base lines of the two dissimilar font sizes will print on different lines. That is displayed in the figure on the right. If a second text-based object is placed on the same line as the larger 12-point object and the smaller font object’s height (boundary) matches that of the larger font, the baselines of the 2 dissimilar font sizes will match, thus printing on the same line. As other text-based objects are added to the report, either by adding lines to the same section or by placing them in other sections, the vertical spacing or interline spacing, while controlled by Crystal Reports, is determined by the printer driver. Remember, the text metrics of a font determines interline spacing. This functionality makes it difficult to create reports designed to print on preprinted forms if the printer driver is going to change. For example, totals that used to print in the middle of a box might now print below the box because the new printer driver applies a greater value to interline spacing. Line by line, the text in the report will move down farther than when the report was first created.
How Crystal Reports Controls Object Placement
Each section’s upper left corner is given the X and Y coordinates of (0,0). CR controls the placement of ALL objects (text-based and OLE objects) within each section by applying an X and Y coordinate to the upper left-hand corner of its boundary. The values are measured and stored as absolute coordinates in twips. A twip is 1/1440th of an inch or a twentieth of a point. A point is 1/72nd of an inch and is used to measure the height of characters. Thus, if the upper left corner of an object’s boundary is 0.5 inches to the right and 0.3 inches down from the top left hand corner of the Details section, the (X, Y) coordinates of that object is (720,432). When it is time to evaluate and print the Details section, the report will know where to start printing the object by referencing these X and Y coordinates.
Free Form Placement
Crystal Reports offers a choice of how vertical placement of objects is to be determined:
1. On the Format menu, choose Section.
2. The Free Form Placement check box (upper right) can be selected or cleared.
This setting will determine how CR references the (X, Y) coordinates to position and begin printing the objects.
If a section is formatted with Free Form Placement cleared, text-based objects are once again bound to lines and the functionality closely resembles that of previous versions of CR. The section will be divided into lines with each line being indicated by a horizontal guideline. As you make the section bigger, you increase its size in increments of complete lines and never by fractions of a line. This can be seen by the addition of new guidelines. Initially, the line height (guideline spacing) for newly created lines is determined by the report engine; however, it is based on the height of the default font sizes, as established in the File Options dialog.
Remember, values for the height of fonts and interline spacing is provided by the printer driver. If you place a text-based object on a line and increase or decrease its font size, the line’s height will change to accommodate the new font size. The positions of all of the guidelines within the section are then automatically adjusted up, or down, as each line’s height changes. For example, a Details section has two columns of text-based objects vertically aligned.
In the above example, the largest font on the line determines the line height. Note that the base line of the font, and not the bottom of the text-based object itself, is attached to the guideline. Also note the height of text-based object boundaries of the smaller fonts when placed on the same line as a larger font. Unlike previous versions, the height does not increase to match the height of the larger font.
When Free Form Placement is cleared, Crystal Reports no longer references the object’s absolute coordinates to determine where it prints. Instead, only the absolute X coordinate is referenced to determine where each object begins printing horizontally (left/right placement). The Y coordinate is still referenced for vertical placement of the object but the coordinates may be adjusted by the report when the printer driver changes. When using a different printer driver that measures interline spacing greater than the driver originally used to create the report, the Y coordinate will be increased and the text-based object will be placed and printed farther down the page. In this manner, the printer driver maintains line spacing. By contrast, the placement of OLE objects such as graphics, boxes and lines is not controlled by the printer driver and is not confined to specific lines (again, as for CR prior to version 5). Thus, Crystal Reports will always reference the object’s absolute coordinates to position and print the OLE object.
For example, when designing a report, a box (OLE object) is placed around a database String field (text-based object). Everything appears to be aligned correctly. The report is printed, using a printer driver that measures interline spacing greater than the original printer driver. The placement of the box does not change relative to the section in which it is inserted (the X and Y coordinates do not change). However, the vertical placement of the text-based object does change because the Y coordinate is adjusted upwards, based on the printer driver being used. Remember, this value is a measurement from the section’s upper left corner. The greater the value, the farther down the page the object will print. This is why clients may complain that the positioning of lines and boxes on their reports is incorrect and that a dividing line, for example, is printing over top of the last line of text instead of underneath.
Distributed reports containing sections formatted with Free Form Placement cleared with inserted lines and boxes or other OLE objects, then the it is necessary to format the objects border properties rather than inserting lines and boxes independently:
1. Right-click on the object, and then select Change Border from the shortcut menu. The Format Editor appears.
2. Select the formatting options you require. Click OK.
If the report requires OLE objects such as graphs, boxes, lines and bitmapped images such as company logos, it is best to have each section formatted with Free Form Placement selected. Not doing so will increase printer driver dependency and could create inconsistent reports. The advantages of having every section formatted with Free Form Placement selected will be discussed in the next section. Remember that every section can be formatted with Free Form Placement selected or cleared. It is highly recommended that every section in your report be formatted in the same manner. Do not have some sections formatted with the Free Form Placement selected and others cleared.
Free Form Placement of Selected Objects
When a section is formatted with Free Form Placement selected, all objects can be placed anywhere in a section. With Free Form Placement selected, it is possible to have two smaller text-based objects placed beside one larger text-based object.
Notice in the above screenshot, that there are no guidelines to indicate specific lines.
Crystal Reports places all objects within a section based on their absolute coordinates. This means that the printer driver no longer controls the vertical placement of text-based objects. In the example above, the report designer places Field 1 and Field 2 on the report. X and Y coordinates that tell CR where to place and print the objects have been applied to the objects. The distance between the baseline of Field 1 and the baseline of Field 2 is in twips (a twip is 1/1440th of an inch) and there is a measurable distance or space between the two text-based objects.
If the report is then printed referencing a printer driver that measures the same font higher, Field 1and Field 2 will still be placed and printed starting at the same coordinates within the section. Thus, if the starting points are the same but the font is higher, the space between the two text-based objects will be reduced.
While the printer driver no longer controls multi-line spacing of text-based objects within the sections, it still determines horizontal spacing of text within the text-based objects and interline spacing of multi-line text objects. In the above example, Field 3 is a memo field that will require approximately five lines to print. As with Fields 1and 2, the placement and starting point will be determined by CR but the interline and character spacing of these five lines will be determined by the printer driver
Using Grids and Guidelines
Each section of a report contains a design grid. The grid always exists and Crystal Reports allows the report designer to determine if the grid is visible or not .
1. On the File menu, select Options.
2. The Grid options are displayed in the lower left section of the Options dialog box.
Setting Grid Size
For example, setting the grid size to .167 will give you six grid lines per inch. The grid size is the same for all sections. The grid is measured from the upper left-hand corner of each section and continues down, and to the right, until the end of the section. A new grid of the same size then begins from the upper left-hand corner of the next section. This continues throughout the entire report.
The Options dialog box also gives you the option of selecting or clearing Snap to Grid. When Snap to Grid is selected, the upper left corner of all newly placed text-based and OLE objects’ boundaries will snap to each grid point. Objects placed before selecting Snap to Grid will not move to snap to the nearest grid point. They will remain where they are. If an object is resized, the side (s) that are resized snap to the closest grid point. If there are several text objects of different font sizes snapped to the same vertical grid point, the base of the text will not line up because it is the object’s upper left corner that snaps to the grid. The height of the text object and the distance from the top border to the text’s baseline is determined by the size of the font. In the example below, Free Form Placement and Snap to Grid are both selected.
This field was placed on the report and then the font size was increased. Notice that the upper left boundary (indicated by the corner crop marking) is snapped to the grid point while the other three corners are not. The text-based object increased in size to accommodate the new font size.
This field was placed on the report and then the right border was moved. Notice that now, both the left and right boundaries are snapped to a grid point.
This field was inserted and then the bottom boundary was dragged down. Notice that the bottom boundary also snapped to the grid line but the font size did not change.
This field was simply placed on the report. The boundary’s upper left corner is snapped to a grid point.
This field was placed on the report when Snap to Grid was not selected. Notice that the object did not move and its boundaries did not snap to any grid point.
Notice that while the CUSTNUM, CONAME and STATE fields are snapped to the same horizontal grid line, the bases of the three fonts do not line up.
Also notice the grid in the top section with the five fields. The section consists of three full grid lines and a partial fourth. Even though the fourth grid line is not visible, the section below starts with a new grid with the sections upper left corner as (0,0).
Guidelines are used to help you line up objects. They have a snap property that automatically snaps objects to them. That is, objects will connect to the guidelines as positioning devices. An OLE object can snap to a horizontal guideline on its top, bottom, or horizontal midline (the invisible line that bisects the object horizontally). However, the snap property of guidelines is different for text-based objects. When a text-based object snaps to a guideline, it is the baseline of the text and not the boundary of the object that snaps to the guideline. Thus, to place several text objects of different font sizes on one line and have their baselines line up, the fields will have to snap to a guideline.
If Snap to Grid is selected and the requirement is to position text objects of different font sizes so that their baselines line up:
1. First insert a guideline. The guideline will snap to the grid line when it is placed.
2. Snap the text-based objects to the guideline.
When placing text-based objects, snapping to a guideline takes precedence over snapping to a grid line. However, if you later resize the text object’s height, the text object will snap the boundary being resized to the closest grid line.
In the example above, when CONTACTLN was first inserted, its baseline snapped to the guideline. When the upper border was then resized by dragging the object’s upper border upwards, the object assumes the characteristics of Snap to Grid. When PHONE was first inserted, its baseline also snapped to the guideline. However, when it was resized by dragging the bottom boundary downward, the object expanded but the precedence of the text snapping to the guideline, instead of the grid line, was maintained.
Becoming familiar with the properties and functionality of grid lines and guidelines and working with the two requires some experimentation. It is important to note that selecting/ clearing Snap to Grid and/or using guidelines or not, is a matter of selecting the best methodology for positioning the objects in your report exactly where you want them to be. Also remember that if you have Free Form Placement cleared (binding the section to lines) and you select Snap to Grid, all objects will snap to the guidelines for vertical placement and the left boundary will snap to both vertical guidelines and grid points.
Report Design Considerations
Listed below are several design hints for creating reports for distribution.
Correctly spacing text objects
While it is best to have Free Form Placement selected (more about this decision later), spacing text objects evenly in such an environment is difficult. An alternative is to initially clear Free Form Placement. Then, when you expand the section, a guideline will be added for each line and the spacing will be consistent. When all objects have been placed in the section, select Free Form Placement and remove the guidelines
An alternative is to use Snap to Grid in conjunction with guidelines as described in the section above, “Using grids and guidelines.”
Placing text objects close to other objects
As previously discussed, a text object’s boundary will not expand at runtime. If the printer driver being used prints fonts wider, the text could be truncated. A solution is to expand the width of the text-based object to accommodate this possible growth. While this is an effective solution, it does require some design considerations when placing text-based objects close to other objects. Consider the following example:
A second object is placed to the immediate right of a text object. In order to accommodate possible growth, the text object on the left is expanded so that its expanded boundary is now overlapping the boundary of the second object. The report is printed and everything looks perfect. It is then printed using another printer driver that causes the text to print wider. Although the first object’s boundary was made wider to accommodate the variance in text width, the two objects’ physical starting points (their X coordinates) do not change. Thus, a situation could exist where the text from the object on the left could print over top of the second object on the right. The same situation could exist when creating a columnar type report, where lines separate the columns. In this situation, the text could potentially print on top of, and outside of, the lines.
It is generally advisable to avoid designing distributed reports where the space between objects is very tight. Leave room for expandability and expand the text objects’ width by approximately 5%. An alternative is to consider reducing the size of the font.
Placement of multi-line text objects
Consider where and how you place multi-line text-based objects. You could encounter problems if you have other objects in the same section placed directly below an object formatted to print on multiple lines. For example, on the development PC, a multi-line text-based object is placed on the first line of a section. Since the text object normally never requires more than three lines to print, the developer places another object on line four of the section. Since a different printer driver could measure the font wider and cause the multi-line object to require an additional line, the object on the fourth line is now in danger of being over printed with the last line of the multi-line text object. Wherever possible, place multi-line text-based objects at the bottom of the section. If they require more lines to print, the section will simply expand to accommodate the growth.
Using TrueType fonts
Designing your report using printer specific fonts may lead to problems when printing to other printers. The fonts may not be supported by other printers or, while they may be supported, they may not be installed on other printers. If this occurs, Crystal Reports will have to make a font substitution that could create inconsistent results. It is recommended that only common TrueType fonts be used. Common True Type fonts include Arial and Times New Roman.
Use the most common video resolution
If you have two identical printers, two identical printer drivers and two identical operating systems but the resolution of the video driver is different, the paging of MS Windows documents will be different. It is recommended that you set your video resolution to 640 X 480 pixels. If a document is designed with the video set to a resolution of 800 X 600 pixels and is then printed on another PC where the video resolution is coarser (such as 640 X 480 pixels), the document will encounter more formatting changes than if it was developed on 640 X 480 and moved to a finer screen resolution. Developing reports with your video resolution set at the most common and coarsest resolution will ensure that your reports will be the least sensitive to video driver settings. Unfortunately, there is no way to design Windows documents to be immune to changing video driver resolutions.
Setting specific margins
CR has the option of setting specific margins or using the printer’s default margins. If you use the default margins and then print in another environment where the printer’s default margins are greater and provide a smaller printable area, the report objects on the right size of the report will print off the page and will be truncated. It is recommended that you always set your own margins. As soon as you do so, the check box to Use Default Margins (File | Page Setup) will be cleared. If the margins you want to use are the same as your default margins, make sure that you clear this check box:
1. On the File menu, select Page Setup.
2. Clear the Use Default Margins check box. Click OK.
Changing Paper Orientation
To change the default printing option from portrait to landscape, select ‘Printer Setup’ from the ‘File’ menu. From the ‘Printer Setup’ dialog box select ‘Landscape’. This option will only appear if the printer is capable of printing in both portrait and landscape modes. Changing the default printing option from portrait to landscape will not change the default margins or user defined margins used by the printer. The option will change only for the particular report.
Free Form Placement Selected for All Sections
In order to create dynamic reports and reduce printer driver dependency as much as possible, it is recommended that all sections of the reports be formatted with Free Form Placement selected.
Remove all guidelines
If objects are snapped to guidelines, they are, in essence, still bound to lines even though Free Form Placement is selected. Thus, to obtain true Free Form Placement, all guidelines must be removed once the design of the report is complete.
Report Creation Checklist for Distributed Reports
• To accommodate possible growth caused by a different printer driver measuring the fonts wider, do not place objects extremely close to each other. It is also recommended that the width of text-based objects be increased by about 5%; alternatively, the size of the fonts may be reduced.
• Consider where, and how, you place multi-line text-based objects. If you have objects placed directly below multi-line text-based objects and in the same section, a different printer driver could cause the multi-line text-based object to require an additional line causing the object below to be over-printed. Keep in mind that the number of lines necessary to print the text-based object could differ from that required on the development PC.
• Use Windows TrueType fonts where possible. These are the most common fonts; they are readily available on all versions of Microsoft Windows and can be realized on all printers.
• Use the most common and coarsest video driver settings. It is recommended that you set your video driver resolution to 640 X 480.
• Set specific page margins.
• Do not choose a specific printer. Choose the default printer unless your application or compiled report needs a specific printer that your client will have and the printer name is the same on both the development machine and your customers’ machines. Specific printers are usually for point of purchase forms, invoices and specific label printers.
• After the report is completed and you are happy with the results, format every section to have Free Form Placement selected.
• Remove all guidelines from the reports.
The report should now be in a state where it is the least sensitive to changing printer drivers and ready for distribution. As you design your report, you are free to use whatever methods you choose to create the look and feel that you want in your report. Bear in mind, however, that the more of the above suggestions that are incorporated into your design, the less sensitive your report will be to different printing environments.
Tips & Tricks
Duplex printing in Crystal Reports
Duplex printing is dependent on the type of printer you have. You must verify that your printer supports duplex printing. Crystal Reports does not control a printer's duplex printing ability. The printer driver for the printer handles the duplex print control. In order to print in duplex mode you must verify the following:
• the duplex printer must be set as the default printer in Windows.
• the report must have the default printer selected in the Printer Setup’ in Crystal Reports.
Printing Subreports in Different Formats
In Crystal Reports, you can format the main report and subreport to print in either Portrait or Landscape. This is because the subreports are considered part of the main report and maintain formatting of the main report. Therefore, individual landscape or portrait page formatting cannot be set and only portrait or landscape formatting can be set for the entire report.
Slow printing When Using a Dot Matrix Printer
When printing in Crystal Reports a virtual page (virtual picture) is generated. Therefore, when printing to a dot matrix printer the printing speed is very slow. A dot matrix printer will take longer to print a picture type file. Therefore, the suggested workaround is to export the report to text format and print the exported file. It is also possible to apply Text Mode settings to a dot matrix printer to improve printing speed. Printing in Graphics Mode can result in a better quality print out, however the printing speed is slower.
Enhancements in Crystal Reports 2008 and Higher Versions
From Crystal Reports 2008 the report designer has a number of new features to consider when printing.
The Section Expert now offers the ability to set orientation for each report section:
Note: Page Header and Page Footer defaults to your default printer setup. Subsections do allow setting the Orientation.
Dissociate Formatting page Size and Printer paper Size
The "Dissociate Formatting page Size and Printer paper Size" option allows the report to literally Dissociate the page layout from the Printer selected when the report is designed.
User Defined Paper Size
This option enables the ability to select a custom or User Defined paper size without having a printer capable of using that paper size:
This is optimal when setting "No Printer (optimize for screen display)" option to on (enabled), for WEB reports mostly or simply to preview reports only with no intention of printing them.
Note: When the "No Printer" option is enabled Crystal Reports uses a Windows file called USP10.dll to render the pages. Currently Crystal reports uses version 1.422.x which is installed in the Crystal Reports bin directory. Note that Crystal Reports may load the USP10.dll from the Windows system folder.
Note: There are limitations with the version of USP10.dll that Crystal Reports uses. For example truncation of character on the right side of the text boxes. See above for more info on what to consider. Part of the solution is to allow for this font rendering format by designing the report with enough free space to allow the object to be formatted accordingly by setting the Right indentation to .7 cm:
Reports designed with the above points in mind, will guarantee correct views and printing when the reports are deployed to other users. These reports can then be successfully consumed by Crystal Reports designer, Crystal Reports viewer, Crystal Reports Server, BI Platform and applications using one of the Crystal Reports Solution Developer Kits (.NET, Java, Restful Web Services).