Meny
Index
  • Dot-Matrix reports
Dot-Matrix reports
Earlier we looked at reports intended for printing on standard modern printers (stylus, laser,etc.). A report sent to a dot-matrix printer will be printed very slowly. FastReport allows the creation of special reports intended for dot-matrix printers, where only standard font symbols and no graphic elements are output; this results in a faster printing speed.
 
Let's see how to build a report of “List” type intended for dot-matrix printing. Earlier we created this kind of report, see the ”List of clients” report. We will use the same data for the report.
 
So, start a new project in Delphi, place “TTable”, “TfrxDBDataSet”, “TfrxReport” and “TfrxDotMatrixExport” components on the form and set their properties:
 
TTable:
DatabaseName = 'DBDEMOS'
TableName = 'Customer.db'
 
TfrxDBDataSet:
DataSet = Table1
UserName = ‘Customers’
 
Open the report designer. Select “File > New…” to open the report wizard dialogue and select the “Dot-Matrix Report” item:
 
 
On clicking ОК an empty design page is shown, marked out for a dot-matrix font:
 
 
The object toolbar also changes to show the objects available for dot-matrix printing, these are “Band”, “Text”, “Line”, “ESC-Command”, “Subreport”, “Cross-tab” and “DBCross-tab” objects. Other objects cannot be used on a dot-matrix printer.
 
 
Place “Report Title”, “Page Header” and “Master Data” bands on the report page:
 
 
Place “Text” objects on the bands as follows:
 
 
The placement of Dot-matrix objects is similar to that in ordinary reports. However, these objects are strictly limited in position and appearance. The objects snap to the grid, the font size (height) cannot be changed and they cannot be colored. But some font attributes can be modified by selecting the “Text” object and clicking the “Tt” button on the toolbar:
 
 
These font attributes are specific to dot-matrix printing. The report page and all the dot-matrix objects, excepting bands, have these attributes.
 
Note: in the designer and in the preview only “Bold”, “Italic” and “Underline” attributes are implemented on screen. The whole set of attributes is implemented only when printing.
 
Let's modify our report using the “Bold” style for the headings. The report is finished and ready for previewing:
 
 
 
Onlinehjälpen skapades med Dr.Explain