Dot-Matrix Reports

Top  Previous  Next

Dot-Matrix Reports

Top Previous Next

      Earlier we examined reports intended for printing with ordinary printers (stylus, laser,etc.). If sent to a dot-matrix printer their printing will be very slow. FastReport allows us to create special reports for dot-matrix printer where only standard font symbols without graphic elements are printed. That is why printing is rather fast.

 

      Let us examine report building of “List” type which is intended for dot-matrix printing. Earlier we created such kind of report, see “”List of clients” report”. We need the same data for report.

 

      So, create a new project in Delphi, place TTable, TfrxDBDataSet, TfrxReport and TfrxDotMatrixExport components on form and set their properties:

 

TTable:

DatabaseName = 'DBDEMOS'

TableName = 'Customer.db'

 

TfrxDBDataSet:

DataSet = Table1

UserName = ‘Customers’

 

      Enter report designer and select “File|New…” menu item. The report wizard dialogue appears with a report wizard list. Select the "dot-matrix report" item:

 

clip0233

 

      On clicking ÎÊ you see empty design page layout marked for dot-matrix font:

 

_img320

 

      The list of objects available for inserting has changed – now they are the “Band”, “Text”, “Line”, “ESC-Command”, “Subreport” and “Cross-tab” objects. Other objects cannot be used in dot-matrix printer.

 

clip0234

 

      Place Report title, Page header and Master data bands on report page:

 

clip0235

 

      Place “Text” objects on bands in the following way:

 

clip0236

 

      Dot-matrix objects placing principle is the same as in ordinary report. Difference is in the fact that objects are strictly bound to netting, and it is impossible to set another font size or color for them. But some font attributes can be modified. To perform this select “Text” object and click “Tt” on toolbar:

 

_img324

 

      As you can see, here you can set font attributes which are specific for dot-matrix printing. Report page and all dot-matrix objects with the exception of bands have these attributes.

 

Attention! In designer and preview only “Bold”, “Italics”, “Underline” attributes are displayed. The whole set of attributes is only printed.

 

      Let us modify our report appearance with “Bold” style for headings. Report is ready, you can run preview mode:

 

clip0237