• No results found

The ‘File’ menu offers several options for opening, saving and printing reports. For most of these choices, a button is available on the button bar as well.

The option ‘New’ offers several options: ‘Standard Report Wizard’,

‘Blank Report’, and ‘Page layer’, see sections 2.1, 2.2, and 16.1.

Use the option ‘Open…’ to open a report. The option opens a Windows common file dialog from which you can select a DataFlex Reports report file. The file extension is .dr for reports and .dpl for page layers.

To close the active report or all reports, the options ‘Close’ and ‘Close All’ are available.

The options ‘Save’ and ‘Save As…’ are self-explanatory.

The option ‘Lock report design’ requires the entry of a password. This password must be entered every time the report is opened in DataFlex Reports. Users can use such reports by integration with your DataFlex application without the password.

Besides printing reports, it is possible to export report data to different file-formats such as PDF, RTF, CSV, Excel and HTML or to an image file (JPG, GIF, TIF or PNG). This option is discussed in paragraph 4.1 below.

To modify the page setup, choose ‘Page Setup’.

The ‘Options’ for DataFlex Reports are explained in section 4.2 below.

The 10 most recently used reports are shown in the menu above the ‘Exit’ option. Simply select one of the listed reports to open it.

Exiting DataFlex Reports while one or more unsaved reports are still open will display a request to save all changes.

4.1 Export

Reports can be exported to various formats.

This includes several formats aimed at human reading (HTML, image, PDF, and RTF) and some aimed at machine reading (CSV and Excel).

Each format has a number of export options which are discussed in the following paragraphs. One common option that all formats support is the selection of pages to export. You can choose to export all pages1, or a single specific page.

After choosing a format and setting its options you will be asked to specify a location and filename. When you chose to export all pages in a format that generates multiple files, this chosen filename is used as a basis for the filenames. The actual files will have an appended dash and sequence number just before the file extension. For instance report.html will generate report-1.html, report-2.html, etc.

4.1.1 HTML export

When a report is exported to HTML this will generate one file for each page. Images are embedded within the HTML file(s).

This format has no format-specific options.

4.1.2 RTF export

The RTF export generates a single file containing all pages.

This format has no format-specific options.

4.1.3 PDF export

The PDF format is widely used for distribution of documents and has some very interesting options.

A PDF document has limited control of how a PDF reading program will display the document by default. The

‘Page display’ options are:

 Full screen

 Display with outline

 Display with thumbnails

 Display without outline or thumbnails

PDF documents can also be secured using passwords. Setting an ‘Owner password’ makes sure that the

document cannot be manipulated without entering that password. Setting a ‘User password’ as well will require readers to enter that password.

Many documents include images, which increases the file size a lot. In order to assure that PDF files are portable images are compressed using an algorithm that drastically reduces the file’s size, but also reduces image quality.

You have a choice to increase the ‘Image quality’ setting from ‘Low’ to ‘High’, which results in better image quality at the cost of a larger file size.

4.1.4 Image export

DataFlex Reports supports exporting to the JPEG, GIF, TIFF, and PNG formats. It can export a single page to an image file, or all pages when using TIFF.

4.1.5 CSV export

The CSV (Comma Separated Values) format is widespread, but also knows numerous variations due to the lack of standardization. DataFlex Reports has a number of options that allow you to generate the format you need.

The ‘Field separator’ in most CSV files is the comma, but implementations using semicolons or pipe characters are also commonplace. In addition, because this character can occur in character values, a ‘character delimiter’

is needed. Usually this is a double quote.

CSV files often represent a single grid of rows and columns. The special sections in a report (report, page, and group headers and footers) cannot easily be identified, so software programs (as well as people) reading the file will have difficulty parsing the data. By default these sections are not exported to a CSV format file, but you can choose to export them anyway using the three checkboxes ‘Export report sections’, ‘Export page sections’, and

‘Export group sections’.

4.1.6 Excel export

The Excel export creates an XLS or XLSX file, depending on which ‘Excel version’ you choose. The default is XLS (Excel 2003).

You can choose to put all data on a single worksheet, or to create one sheet for each page. Note that Excel versions before 2010 have a maximum of 65,536 rows per worksheet.

By default the program attempts to export the file into a format that visually corresponds to the original report (more or less). It uses the rows and columns of Excel as a drawing grid, which you can manipulate by changing the ‘Column width’ setting. If you wish to export the report without any alignments and markup, the checkbox

‘Export data only’ allows you to do that.

In contrast to the CSV format Excel files have a lot of styling options, which makes report sections identifiable.

Therefore by default they are included in the export. If you do not want that, you can disable them.

4.2 Options

The window containing the default settings for DataFlex Reports consists of three tab pages: ‘Options’, ‘Fonts’

and 'Formatting'.

4.2.1 Options tab-page

By checking the option ‘Snap to Grid’ in the

‘Grid options’ group, objects will automatically be aligned with the nearest line of the grid.

The distance between the grid-lines can be set here as well.

The option ‘Show guidelines’ determines if guidelines are displayed in the designer. These guidelines can be created by clicking within the rulers of the report designer.

By checking the option ‘Insert Detail Field Headings’ in the ‘Field Options’ group the name of a field will be automatically added as a field-title in the ‘Page Header’ section of the report.

The ‘Insert Group Name with Group’ setting automatically places a group-name above a new group.

In the group "Datasource options" the setting of the ‘Show tables’, ‘Show views’ and ‘Show stored procedures’

decides whether to list SQL Tables, SQL Views and SQL stored procedures in the Database Expert and New Report Wizard.

When the option "Show information messages" is ticked, the product will show you informational messages from the ODBC backend or messages like "Cannot open file".

The option ‘Always Sort Locally’ applies to reports with ODBC as a datasource. For the DataFlex database records are always sorted locally. To sort records from an ODBC datasource using the selected collation instead of the collation used in the ODBC backend you can check this option.

Checking the box offers the possibility of performing a special sort order, defined in the collating sequence configuration file named df_collate.cfg. DataFlex Reports copies the collating sequence configuration file to its own environment during the installation of your DataFlex. The sort order defined in that file can be easily adjusted using a text editor.

When using DataFlex as you datasource you have to make sure that the contents of this configuration file in your DataFlex

environment matches with the sort order defined in the indexes of the tables that you use. The contents of the collating sequence file in the DataFlex Reports environment and in the DataFlex environment may differ from each other, but if they do you will see a different sort order in the reports to that in the applications you distribute, which may be confusing for readers and is therefore discouraged.

4.2.2 Fonts tab-page

This page is reserved for the default fonts that are to be used in a report, can be set for the following sections: ‘Fields’, ‘Sum Fields’,

‘Group Name Fields’, ‘Text Objects’ and ‘Field Titles’.

Click on the prompt button at the end of the field of which you want to change the font to select the default font, style, size and color.

4.2.3 Formatting tab-page

This page contains the default formatting options for 'Text', 'Number', 'Integer', 'Date' and 'Time' fields when they are used in the report.

For example if you like a date field to be formatted using a custom date layout you can click the prompt button at the end of the date field formatting option and change the defaults.

Related documents