Printing Data or Forms As PDF

Quick Guide >>

Print data as PDF

Note : This feature is deprecated,use Fast Reports instead.

The PDF Doc designer is a part of the Print Form functionality provided with TStructs.This enables you to design a PDF document into which the TStruct fields can be embedded.

Steps to create a PDF format

Step 01:  Select the TStruct in build mode and Click the <Print Form> button from the TStruct Tool Bar

Step 02: Choose the option <PDF Doc> from the menu

Step 03: Click on the <New> icon and drop components (text boxes, labels, images and tables) onto the canvas and arrange them.

The canvas is divided in the 5 sections as show below.

  • The fields in Report Header & Report Footer will print only on the first and last page.
  • The fields in Page Header, Page & Page Footer will print on every page.

Step 03: Click on the <SQL> icon and define the SQL

If a Grid or a SQL data have to be printed, a SQL has to be defined to fetch the data from the relevant tables. Every SQL should have a name, a Data Source Name.

Step 04: Choose the <Label> component and drop it on the canvas.

Step 05: Set the properties for each component in the properties box.

Text: for the component to be used as a Label, mention the caption in the in this property. Leave the Source & Source field blank.

Source: To print the field value, leave the test property blank, choose the source as ‘Fields’.

Source Field: To print the field value, choose the field name.

To print a SQL result, choose the <Table> component and drop it on the canvas.

In the property window select the source SQL, set the number of columns required in the table. Click on the […] besides the Cols field in the table properties box to customize the columns in the table. Select the fieldname, enter caption and select data type for each column.

Use the following properties to control grid lines in the Pdf document :

Grid horizontal line – set it off to suppress printing only horizontal lines.

Grid Vertical line – set it off to suppress printing only vertical lines.

Header lines – Set this off to suppress printing of horizontal lines above and below the column header.

Footer lines – Set this off to suppress printing of horizontal line at the bottom of the grid.

Other options

Add Image: Images can be added in the print format. The image can be a static one for which the file name has to be mentioned. If you need the image to be printed from a Image field, mention Image field and source.

PDF Page properties: The page properties can be set. At present the designer supports A4, A3, Legal, Letter and Custom paper formats.