• No results found

DataFlex Reports User Guide. Create reports to get relevant information out of your data

N/A
N/A
Protected

Academic year: 2022

Share "DataFlex Reports User Guide. Create reports to get relevant information out of your data"

Copied!
189
0
0

Loading.... (view fulltext now)

Full text

(1)

DataFlex Reports User Guide

Create reports to get relevant information out of your data

(2)

Technical support:

Internet: http://www.dataaccess.com Forums: http://support.dataaccess.com/forums

E-mail: [email protected] Revision Date: December, 2014

DataFlex Reports User Guide

(3)

COPYRIGHT NOTICE

© 2009-2014 DATA ACCESS CORPORATION. All rights reserved.

No part of this publication may be copied or distributed, transmitted, transcribed, stored in a retrieval system, or translated into any human or computer language, in any form or by any means, electronic, mechanical, magnetic, manual, or otherwise, or disclosed to third parties without the express written permission of Data Access Corporation, Miami, Florida, USA.

DISCLAIMER

Data Access Corporation makes no representation or warranties express or implied, with respect to this publication, or any Data Access Corporation product, including but not limited to warranties of merchantability or fitness for any particular purpose.

Data Access Corporation reserves to itself the right to make changes, enhancements, revisions and alterations of any kind to this publication or the product(s) it covers without obligation to notify any person, institution or organization of such changes, enhancements, revisions and alterations.

TRADEMARKS

DataFlex is a trademark of Data Access Corporation.

DB2 is a registered trademark of IBM Corporation.

Pervasive.SQL is a registered trademark of Pervasive Software, Inc.

Windows Server 2008, Windows Server 2003, Windows 7, Windows Vista, Windows XP, Windows ME, Windows 2000 and Windows 98 are registered trademarks of Microsoft Corporation.

All other company, brand, and product names are registered trademarks or trademarks of their respective holders.

(4)

Table of Contents

1. Welcome to DataFlex Reports! ... 8

2. Getting started with DataFlex Reports ... 9

2.1 Creating a new report using the Report Creation Wizard ... 10

2.2 Create a new report using a blank report... 17

2.3 Create a new report based on an existing report ... 17

3. Charts ... 18

3.1 Adding a chart ... 18

3.2 Chart types ... 19

3.3 Modifying the layout and appearance of a chart ... 20

3.4 Changing the datasource of a chart ... 23

4. The File menu ... 24

4.1 Export... 24

4.2 Options ... 26

5. The Edit menu ... 29

5.1 Undo and Redo ... 29

5.2 Cut, Copy, Paste and Delete ... 29

5.3 Select all ... 29

5.4 Find ... 29

5.5 Go to page ... 29

5.6 Object ... 29

6. The View menu ... 30

6.1 Field explorer... 30

6.2 Report explorer ... 32

6.3 Repository explorer... 34

6.4 Arrange Objects ... 34

7. The Insert menu ... 36

7.1 Field heading ... 36

7.2 Summary ... 36

(5)

7.3 Group ... 37

7.4 Function field... 37

7.5 Text object ... 38

7.6 Line, Box and Picture ... 38

7.7 Chart object ... 38

7.8 Sub-report ... 39

8. The Format menu ... 40

8.1 Font ... 40

8.2 Lock size/position ... 40

8.3 Suppress field ... 40

8.4 Field properties ... 40

8.5 Move ... 49

8.6 Align ... 50

8.7 Size ... 50

9. The Database menu ... 51

9.1 Database expert ... 51

9.2 Check database ... 56

9.3 Set datasource location ... 58

9.4 Edit RDS Sample Data ... 58

9.5 Browse data ... 59

9.6 Show SQL query ... 59

9.7 Select distinct records ... 59

10. The Report menu ... 60

10.1 Filter expert ... 60

10.2 Filter function ... 61

10.3 Page Layer Expert ... 61

10.4 Section expert ... 62

10.5 Function Explorer ... 64

10.6 Group expert ... 65

10.7 Record sort expert ... 66

(6)

10.8 Group sort expert ... 67

10.9 Refresh report data ... 67

10.10 Performance information ... 68

10.11 Report document properties ... 68

10.12 Report options ... 69

11. The Language menu ... 70

12. Functions ... 71

12.1 Syntax ... 71

12.2 Language elements ... 71

12.3 Built-in functions ... 78

12.4 Supported operations per data-type ... 162

13. External Library Functions ... 164

13.1 DLL location ... 164

13.2 Reference ... 164

13.3 Prewritten ELF functions ... 165

13.4 Creating your own ELF DLL ... 168

14. Parameters ... 169

15. Special Fields ... 170

16. Page layers ... 173

16.1 Create a new page layer ... 173

16.2 Using a page layer in a report... 173

16.3 Hiding page layers ... 173

16.4 Updating a page layer ... 174

17. ANSI collation sequences ... 175

17.1 ANSI code pages ... 175

17.2 DataFlex Reports ANSI collation file ... 175

17.3 Example ... 176

18. Automating DataFlex Reports ... 177

18.1 Close DataFlex Reports ... 177

(7)

18.3 Open a report preview... 177

18.4 Start DataFlex Reports with a specific workspace ... 177

18.5 Print a report ... 178

18.6 Export a report ... 178

18.7 Using a command file ... 179

19. Product support ... 182

20. Product registration and activation ... 183

21. Problems and solutions ... 184

21.1 Cannot open the language database ... 184

21.2 Unable to instantiate COM object ... 184

(8)

1. Welcome to DataFlex Reports!

DataFlex Reports is a software tool for delivering timely, well organized reports and information to the people who need it.

Designed to be used by end-users, power-users and professional software developers alike, DataFlex Reports works with a wide variety of ODBC datasources including – but not limited to – Microsoft SQL Server, IBM DB2, Oracle, MySQL, Pervasive SQL, PostgreSQL, Microsoft Access, the DataFlex embedded database and more.

The use of ODBC as the datasource is strongly advised when reports are created for a DataFlex based

application that has its data stored in an SQL environment (such as in MS SQL Server) rather than using the INT files found in the application’s data folder.

DataFlex Reports’ Report Creation Wizard steps users through the entire process of creating a report from selecting datasources to grouping, filtering, summarizing and sorting information. The wizard displays the completed report in a visual, drag & drop WYSIWYG interface. Ready to view the results on-screen, print or make further formatting changes and enhancements. A full range of text formatting (fonts, bold, italics, justification, etc.) is available in DataFlex Reports along with a rich library of string, logical and math functions.

DataFlex Reports is developed in DataFlex, the state-of-art software development tool from Data Access Worldwide.

For DataFlex developers, DataFlex Reports offers both seamless integration with their DataFlex development environment and seamless integration of reports in Windows and web applications. When the developer edition of DataFlex Reports is installed you have the option to install a report integration wizard and library for

integration of reports with applications made in the DataFlex Studio. More information about this integration can be found in the DataFlex Reports Developer Guide.

For deployment, reports integrated in DataFlex Windows and web applications require only the installation of a single OCX. Distribution of integrated reports and the OCX is royalty-free with the Developer Edition of DataFlex Reports.

(9)

2. Getting started with DataFlex Reports

There are two things you may want to look at first.

Check the ‘Options’ from the ‘File’ menu and make sure that DataFlex Reports uses the defaults of your preference. All possible options are covered in section 4.2 (Options). The second thing to do is to change the language. For more information how to change the language read section 11 (The Language menu).

There are three ways to start creating a new report:

 Use the Report Creation Wizard

 Use a blank report

 Use an existing report

Before creating a new report it is important to decide what data needs to be shown and how the information will be grouped.

Let’s suppose that the report needs to show order-information and that the orders must be presented in groups of order-lines per order-number. The data needed for making this report would be:

 Per order-line:

o product-number o product-description o quantity

o price

 Per order:

o For the ‘order header’:

 order-number

 order-date

 customer-name

 customer-address

 payment- and shipping-conditions o For the ‘order footer’:

 total order amount

Next, determine which tables are needed to show the necessary information. Typically for a report that needs to show order-information, the order-header, order-details, products or inventory, and customer table are needed.

These tables need to be related to each other. The relationship looks like this:

Other things to consider:

 In which order must the data be presented? Will it be sorted by order-number? Or customer-number?

 Must all orders be printed, or should it be possible to filter certain orders? What are the filtering criteria?

Order Detail Order Header Customer

Inventory

(10)

2.1 Creating a new report using the Report Creation Wizard

The Report Creation Wizard supports the steps that are needed to create the different parts of a report. The wizard is started from the ‘File’ option in the menu, followed by the ‘New’ and ‘Standard Report Wizard’ options. Another way to start the wizard is by using the Ctrl+ N shortcut.

Click on the button ‘Next’ to select tables to be used in the report.

2.1.1 Step 1: Select the tables

The DataFlex ‘Order Entry’ sample workspace is used for illustrating the use of the wizard. In section 9.1.1 (Available datasources) on page 51 an in depth explanation of datasources is

provided, specifically, the access to data via ODBC.

After selecting ‘DataFlex’ in the treeview and clicking the ‘Open’ button, select the filelist.cfg file that comes with the Order Entry workspace.

filelist.cfg is a DataFlex configuration file where the (metadata of) tables are stored. It is also possible to open DataFlex workspaces (.sws or .ws files) and individual tables without using filelist.cfg.

After selecting filelist.cfg, a ‘+’ symbol will appear next to the DataFlex option. Click on the ’+’

symbol to show all tables.

A table can be added by double-clicking on it. By using the buttons in the center of the dialog, tables can be added or removed from the report.

The buttons with a single > or < symbol can be used to add or remove a single table. The buttons with << and >> apply to all tables.

Select the tables ‘OrderDtl’, ‘OrderHea’, ‘Invt’

and ‘Customer’. Click on the button ‘Next’ to define the relationships between the tables.

(11)

2.1.2 Step 2: Defining relationships between tables

If we use the tables of the DataFlex Order Entry workspace, the relationships are automatically recognized by the DataFlex file-system.

The boxes in the links viewer can be dragged around or made smaller or larger.

Clicking "Auto-Arrange" reorganizes the display.

Read the section Relationships to create relationships manually.

Click on the button ‘Next’ to select the database fields used on the report.

2.1.3 Step 3: Select the fields

As with the previous selection dialog, the buttons in the middle section support adding or removing one field or all at once.

The fields will be arranged in sequence as sorted in the right panel. Change the order by selecting a field and clicking the buttons with the Up or Down arrow in the top right of the panel.

Click the ‘Browse Data’ button to see a sample of the actual data in the fields. Click the ‘Find Field’

button to search for a field by name.

Add the fields ‘OrderHea.Order_Number’, ’OrderDtl.Qty_Ordered’, ’Invt.Description’, ’OrderDtl.Price’,

’OrderDtl.Extended_Price’, ’OrderHea.Terms’, ’OrderHea.Ship_Via’, ’OrderHea.Customer_Number’,

’Customer.Name’, ’Customer.Address’, ’Customer.Zip’ and ‘Customer.City’. Click on the button ‘Next’ to group the data.

(12)

2.1.4 Step 4: Group the data

After selecting the database fields for the report the wizard continues with the option to group the data. In the case of the ‘Order Entry’ sample data, it makes sense to group by the order-header and order-detail data. An in-depth explanation of this can be found in section 10.6 (Group expert).

In order to create a new group, select the database field in the treeview on the left. In that tree view, find two options:

 ‘Report Objects’; showing the database fields that have been selected in the previous page of the wizard.

 The second is an option for showing the datasource with all tables and fields.

If a database field to be grouped on was already selected for the report, it can be found in both options. The quickest way to select a field is to click on the ‘+’ symbol in front of the ‘Report Objects’ and click on the field.

When clicking the button with the ‘>‘ symbol in the center, the data will be grouped by that field.

The data in the report will be sorted in ascending order by default. In the bottom of the treeview on the right- hand side, this can be changed. For each field that is grouped on, the sort order can be set to ascending or descending.

The Group can easily be removed from the report by selecting it in the panel on the right-hand side and clicking the button with the ‘<‘ symbol.

Group by the fields ‘OrderHea.Customer_Number’ and ‘OrderHea.Order_Number’. Click on the button

‘Next’ to add sum and total fields.

2.1.5 Step 5: Sum values; totaling

Having defined the grouping, a dialog to select fields to total on is displayed.

Similar to the previous steps, the appropriate fields can be selected and moved to the other panel to be designated totals.

By selecting the type of sum in the combo box, several ways of totaling can be opted for. The default choice is ‘sum’.

Select the fields ‘OrderDtl.Qty_Ordered’,

‘OrderDtl.Price’ to add a sum on those fields.

Click on the button ‘Next’ to add data filters.

(13)

2.1.6 Step 6: Define data filters

The interface for selecting or removing fields is quite similar to the previous dialogs. The fields to filter on can be added to the column on the right.

Selecting the field in the right box will enable the operator and value dropdown box.

If you click the drop-down arrow of the value dropdown box you will get a sample set of data from the datasource. This is the same as the

‘browse data’ button underneath the 'Available Fields' list would produce. The difference is that you can pick a value from the list.

A more complete description of applying filtering criteria can be found in section 10.2 (Filter function).

Select the field ‘OrderHea.Customer_Number’ and pick ‘is equal to’ from the operator dropdown box. Enter

‘1’ in the Value box. Click on ‘Next’ for the next wizard page.

2.1.7 Step 7: Report options

After having defined the filtering criteria, the wizard will continue to the options screen.

The first combo box lets you select the page size for the report. Selecting a correct size here helps you in the further design of the report. The new report wizard divides the selected fields over the width of the paper, selecting the desired page size will give a different reduction in width if more fields are selected than can be presented on one row.

The work done to select the datasource and create the data-model can be something that is reusable for other reports in the future. By storing

this in the repository, it can be made immediately available at a later time. It helps to give it a meaningful name;

in this case ‘Order Information (DataFlex)’ would be right.

Click the 'Next' button to go to the Finish page. Here you can close the wizard by clicking on the ‘Finish’

button.

(14)

2.1.8 Step 8: Change the visual design of the report

After closing the wizard, the report is presented in the visual designer of DataFlex Reports as shown.

The visual designer consists of several parts. A report always has a minimum of the following sections:

 Report Header

 Page Header

 Details

 Report Footer

 Page Footer For each group, two extra sections are added to a report:

 Group Header

 Group Footer

Section Will be printed

Report Header First section of the report that gets printed

Page Header At the beginning of every page

Group Header At the beginning of each group

Details For each row

Group Footer At the end of each group

Page Footer At the bottom of every page

Report Footer Last section of the report that gets printed On the left-hand side of the visual designer the labels of the various sections are shown.

A preview window can be opened to see what the result of the report will look like. Activating the preview window can be done in several different ways:

 Select the ‘Preview Report’ option in the menu under ‘View’

 Click the ‘Print Preview’ icon in the button bar

 Use the Ctrl +R shortcut

 Click the ‘Refresh’ icon in the button bar to show and/or refresh the data

 Use the F5 function key Hide the report header and footer

In the ‘Section Expert’ sections can be hidden so that they do not get printed. Hiding can be done always or conditionally based on the results of a function. Hover the mouse cursor over the label of the ‘Report Header’ in the left part of the section and click the right mouse button. A context menu shows the option to hide the section. The visual designer will now show the hidden section in a grey, shaded area. The same action can be repeated to hide the section of the ‘Report Footer’.

(15)

Moving and resizing of fields and objects

A field can be selected with the mouse, and dragged to the appropriate position. Resizing a field can be done by hovering the cursor over the border of the field. When the cursor shape changes, drag with the mouse to resize the field.

Fields can be selected via a lasso. Hold the Shift key down and drag with the mouse. Fields can also be moved by use of the cursor keys on the keyboard. Resizing can be done by keeping the Shift key pressed, while clicking a cursor

key. When multiple objects are selected with the lasso the order of selection depends on the order in the Report Explorer.

The way the cursor keys react depends on the settings of the grid options. Read more about this in section 4.2 (Options).

A number of fields in the ‘Details’ section needs to be moved to one of the ‘Header’ sections. Before starting to move anything, it makes sense to enlarge the ‘Header’

sections. Move the cursor over the bottom separator of the section. The cursor shape changes and the section can be enlarged by holding the left mouse button down, while dragging the separator down.

Multiple fields can be moved at once: select multiple fields with the mouse while keeping the Ctrl key pressed.

Then move all selected fields to the ‘Group Header #1’

section by dragging the mouse while holding down the left mouse button.

Replace ‘OrderHea.Order_Number’, ‘Orderhea.Terms’ and ‘Orderhea.Ship_Via’ to ‘Group Header #2’ and

‘OrderHea.Customer_Number’‘Customer.Name’, ‘Customer.Address’, ‘Customer.Zip’and ‘Customer.City’ to the ‘Page Header’.

(16)

Changing the appearance of fields

Looking at the report in the preview window you may want to change the formatting of certain fields.

The appearance can be changed via field properties. Numeric fields for example will show 2 decimals per default. Start the field properties dialog from the Format menu, choosing the 'Field Properties' menu item or by clicking the right mouse button on the field and then selecting the 'Field Properties' option.

Select object ‘Sum of OrderDtl.Qty_Ordered’

and open the properties dialog. On the last tab page, change the ‘Number format’ to

‘Custom Number’ to have zero decimals and remove the ‘Thousand separator’. Click the

‘OK’ button to save this setting.

Add lines and text objects

There are several ways to add a ‘Text Object’ to a report:

 Select the ‘Text Object’ option from the Insert menu.

 Click the icon on the toolbar for adding a ‘Text Object’.

 Click the right mouse button in the section and choose the

'Insert' option in the context menu, followed by selecting the ‘Text Object’ option.

Draw a ‘Text Object’ in the ‘Page Header’ section. Right click on the ‘Text Object’ and select ‘Edit text’ from the popup menu. Type ‘Printed on’ into the box and click with the mouse outside the box. Move the Special field ‘Print Date and Time’ from the ‘Report Header’ right after the text object.

In the ‘Group Header #2’ and ‘Group Footer #2’ separator lines are added. Select the line object in the toolbar. The cursor changes into a pencil. Move the mouse to the position where the line should start and drag the mouse, while pressing the left mouse button, to the position where the line should end.

Each order on a new page

To place each order from the order entry system on a separate page we have to open the Section Expert. You will find this on the Report menu.

Select the ‘Group footer #2’ and check the box ‘New page after this section’. Click the

‘OK’ button to save this setting.

The preview now shows that each order will be printed on a new page.

(17)

2.1.9 Step 9: Storing a report

The screenshot on the right shows the preview of the report that was made using the wizard.

Save the report by choosing ‘Save’ from the File menu, and enter a logical name so that you can find the report again later. For example "orders with details.dr". The report can be stored anywhere on disk as the datasource location is stored in the report. The

reports folder in a DataFlex workspace (e.g. c:\DataFlex Examples\Order Entry\Reports) is the preferred location for report files. The integration wizard used to integrate reports in a DataFlex application will first look in that folder.

2.2 Create a new report using a blank report

Select the option ‘Blank Report’ from the File menu to create a new report. A tab page for the design of the new report is now available.

The most important steps for making a new report are:

 Select the datasource, using the Database expert.

 Create groups, using the Group expert.

 Add fields to the report, using the Field explorer.

 Add other fields such as texts, totals and page-numbers.

 Add filtering-criteria using the Filter Expert or add them manually, using the Filter Function.

 Finish the visual design of the report.

2.3 Create a new report based on an existing report

If the functionality of a new report is comparable to that of an existing report, you could consider taking the existing report as a starting point. Open the existing report (File menu, ‘Open’) and save the report under a new name. (File menu, ‘Save As’).

If it is likely that multiple reports will be using the same tables, the use of the repository is recommended, see the 6.3 (Repository explorer).

(18)

3. Charts

A chart is a graphical representation of data, in which the data is represented by symbols, such as bars in a bar chart or lines in a line chart.

3.1 Adding a chart

You can add a chart by clicking on the ‘Chart Object’ option in the Insert menu or by clicking on the chart icon in the toolbar. The insert Chart wizard will appear.

After clicking on ‘Next’ in the welcome page you can select the type of chart you want to use in your report. The different chart types are explained in section 3.2 (Chart types).

3.1.1 Datasource

After selecting the chart type you must select the datasource for the Category (X-axis) and Value (Y-axis).

(19)

3.1.2 Labels and Appearance

In the final page of the wizard you can change the basic appearance of the chart.

The Palette color scheme defines the colors used to draw the bars, lines, dots, etc. that represent the values. The palette schemes can't be changed and are predefined.

The Appearance color scheme defines the colors to draw the lines and background of the charts. The appearance schemes are

predefined but can be overridden. See section 3.3 (Modifying the layout and appearance).

3.2 Chart types

3.2.1 Area

An area chart is very similar to a line chart. Data is displayed using different colors in the "area" below the line. Area charts are commonly used to display

accumulated values over a period of time.

3.2.2 Bar

A bar chart displays data with rectangular "bars" with lengths relative to the data they symbolize. Generally a bar chart is used to display discontinuous data (data that has a discrete value); however it can also be used for continuous data.

Examples of discontinuous data would be "car color" or "tire size"; examples of continuous data would be "population" or "age".

3.2.3 Line

A line chart is used to show a series of data points connected by straight line segments. Charts of this type are generally used to illustrate trends in data over a period of time.

(20)

3.2.4 Point

A point chart displays data in a grid using Cartesian coordinates. Data is displayed along the x and y axis, where x and y can represent any type of data. A point chart is also referred to as a plot or scatter chart.

3.3 Modifying the layout and appearance of a chart

When you click with the right mouse button on a chart, a popup menu comes up where you can select the option "Chart properties". Within the Chart properties you can change how the chart will be displayed.

At the left bottom corner you will find a button "Change datasource". This will start up the chart wizard where you can change the chart type, datasource and the basic layout of the chart.

3.3.1 Common

In this tab page you can change the chart type, see section 3.2 for the different chart types you can select.

The Appearance and Palette options define the default colors used in the chart where palette defines the colors used to draw the bars, lines, dots or slices that represent the values. The appearance scheme defines the default colors used to draw the lines and background that makes up the chart.

The border defined in the Common tab page is the border around the chart. Here displayed in

blue. When the color is set to default it takes the color defined in the Appearance scheme currently selected.

To display a label displaying the value of each bar, point, etc. check the "Label visible" checkbox.

(21)

3.3.2 Legend

If you want to display a legend check the

"Legend Visible" checkbox on the "Legend" tab page.

The text font used in the legend can be changed by clicking on the button right beside the "Legend Font" box.

The placement of the legend box is defined by the Horizontal and Vertical select boxes. The base point is in the left top corner. Where

"Near" is the position closest to this point (left or top) and "Far Outside" the position farthest away (right or bottom).

"Marker height" and "Marker width" define the size of the marker icon left of the legend text.

When the colors in this tab page are set to "Default", the colors defined in the Appearance scheme currently selected are being used.

3.3.3 Titles

On the "Titles" tab page you can define some extra text that will be displayed with the chart:

a title and a subtitle.

The alignment of the titles is set in the reading direction where "Near" is on the left side and Far on the right side.

You can 'dock' each title on the "Top",

"Bottom", "Left" and "Right". The reading direction of "Top" and "Bottom" is from left to right, from bottom to top when docked on the

"Left" and top to bottom on the "Right" side.

3.3.4 Category

The ‘Category’ tab defines options for the X- Axis.

Unchecking the ‘Visible’ checkbox hides all information about the X-axis from the chart.

With the "Reversed" checkbox the Axis can be reversed were the last value becomes the first value in the chart.

The position of the X-axis within the chart can be changed using the ‘Alignment’ option.

Normally the axis is drawn at the bottom of the chart (‘Near’ option), but it can be set to the top by selecting the ‘Far’ option.

The text, font, and alignment of the title can be changed.

(22)

The category labels are displayed using a specific angle (default 45 degrees) and font. If the angle of the label is set to 0, the label will be centered on the axis value.

When the colors in this tab page are set to "Default", the colors defined in the Appearance scheme currently selected are being used.

3.3.5 Value

The ‘Value’ tab defines options for the Y-Axis and is similar to the Category tab above.

One difference is the position of the Y-axis within the chart. Normally the axis is drawn at the left of the chart (‘Near’ option), but it can be set to the right by selecting the ‘Far’ option.

The default angle for category labels is 0 degrees.

3.3.6 Lines

The ‘Lines’ tab contains options for the grid lines in the chart area.

Four types of grid lines exist: (major) vertical lines, minor vertical lines, (major) horizontal lines, and minor horizontal lines. The minor lines cannot be displayed without the major lines.

For each type the visibility, line style, and line color can be defined.

When the colors in this tab page are set to

"Default", the colors defined in the

Appearance scheme currently selected are being used.

3.3.7 Scale

In the ‘Scale’ tab a number of options for the display scale of the axes can be defined.

When "Side margins" is checked, extra space is drawn on both sides of the chart. Uncheck

"Show zero level" if you want the chart to start with the first value instead of zero.

With "Tick spacing", which becomes available when you uncheck "Auto spacing", you can define when the chart draws a 'major' tick with a label. In the example shown here, every 2 values a tick is drawn. The "Minor ticks"

defines the amount of ticks to be drawn

(23)

3.4 Changing the datasource of a chart

If you want to change the data of the chart you can click on the button "Change datasource". The chart wizard will be reopened where you can change the datasource. See section 3.1 (Adding a chart).

(24)

4. The File menu

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.

(25)

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’.

(26)

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.

(27)

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.

(28)

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.

(29)

5. The Edit menu

The ‘Edit’ menu contains several options for manipulating objects in the design window. If the preview window is active the 'Go To Page' option is the only available option.

5.1 Undo and Redo

Every change to an object can be undone by the ‘Undo …’ option. Re- apply the change by using the ‘Redo …’ option. There are no limitations on the maximum number of undo’s that can be performed.

5.2 Cut, Copy, Paste and Delete

The options ‘Cut’, ‘Copy’, and ‘Delete’ are only available when at least one object in the design windows is selected. Once an object is copied or cut, the ‘Paste’ option will be available.

5.3 Select all

Select all objects in the design window by choosing ‘Select All’. After that you can use options that can be applied to multiple selected objects such as 'Bold', 'Italics' or 'Copy'.

5.4 Find

In large reports it can happen that an object becomes more difficult to find. Use the ‘Find’ option to find an object. The name attribute of the object is used for the search. If the object is found, it will be selected and easily visually identifiable as such.

5.5 Go to page

In the preview window, a quick way to go to a certain page is by using the ‘Go to Page’ option.

Entering a page number larger than the last page of the report jumps to the last page of the report.

5.6 Object

The last item on the menu shows "Object" or "Edit Text",

"Edit Function" or "Edit Parameter". When it shows

"Object" the menu item is unavailable and cannot be chosen. For "Edit Text", click on a text object (such as a column label). For "Edit Function" click on a function object in the report and the function editor dialog will be presented. This is documented in chapter 12. For "Edit Parameter" click on a parameter object in the report and the parameter dialog will be presented. This is documented in chapter 14.

(30)

6. The View menu

From the ‘View’ menu, several windows and panels that are available in DataFlex Reports can be opened.

The ’Design’ and ‘Preview Report’ options switch between the design window and the preview window.

If a window is opened, the active window can be closed using the ‘Close Current View’ option. You can achieve the same result by clicking the 'X' in the report design or preview tab-page.

The options for ‘Field Explorer’, ‘Report Explorer’, ‘Repository Explorer’ and ‘Arrange Objects’ are explained in paragraphs below.

Clicking the option for the ‘Status Bar’ switches the status bar in the bottom of the window to show, or not. The check-mark in front of the option indicates that the status bar is activated.

The ‘Zoom’ option will represent the content of an active window in a larger or smaller size.

6.1 Field explorer

The Field Explorer is launched from the ‘View’ menu or the button from the button bar. The Field Explorer is used for adding fields to a report.

The tree view shows five top-level branches: ‘Database Fields’, 'Parameter Fields', ‘Function Fields’, ‘Group Name Fields’ and ‘Special Fields’.

Clicking the ‘+’ symbol for ‘Database Fields’ will expand the tree and show the tables that are available for the report. Clicking on the ‘+’

symbol for a table will show the fields of that table. You can drag a field from the tree to the report.

(31)

Clicking the ‘+’ symbol for ‘Parameter Fields’ will expand the tree and show all the parameter fields for the report. After selecting ‘Parameter Fields’ in the tree view, the button ‘Create new’ in the button bar at the top of the panel is enabled. The ‘Delete’, ‘Edit’ and ‘Rename’ buttons are enabled when a parameter field is selected. The same options are available in the context menu, which can be activated by clicking the right mouse button while a parameter field is selected. Parameter fields are detailed more fully in chapter 14 (Parameters).

Clicking the ‘+’ symbol for ‘Function Fields’ will expand the tree, and show all the function fields for the report. After selecting ‘Function Fields’ in the tree view, the button ‘Create new’ in the button bar at the top of the panel is enabled. The ‘Delete’, ‘Edit’ and ‘Rename’ buttons are enabled when a function field is selected. The same options are available in the context menu, which can be activated by clicking the right mouse button while a function field is selected. See more about function fields in section 7.4 (Function field) and chapter 12 (Functions).

In the section named ‘Group Name Fields’, a field is listed for each group in the report. See more about groups in section 10.6.

The section ‘Special Fields’ pertains to fields like report title, page number and print-date and -time. An explanation of the special fields is listed in chapter 15 (Special Fields).

Add a field to a report as follows: activate the design window of the report and select the field to add. Drag the field from the Field Explorer above the design window where the field needs to be placed, to drop it.

Remove a field from a report by selecting the field in the design window and pressing the Del key, or use the context menu activated by a right mouse click, followed by choosing ‘Delete’.

(32)

6.2 Report explorer

The Report Explorer is launched from the ‘View’ menu or by clicking the button from the button bar. In a tree view it shows the several sections of the report and provides opportunities to modify, reorder or remove objects, or to add sections to a report.

Filters for showing or hiding data fields, functions, parameters, graphical objects and sub-reports can be toggled by their buttons in the top of the panel.

If a node is selected, a right mouse click presents a context menu, offering several options. There are different context menus for different nodes.

The floating menus for 'Report Header', 'Page Header', 'Details', 'Report Footer' and 'Page Footer' offer the same options. The floating menus for 'Group Header' and 'Group Footer' also contain the same options.

The next paragraphs show what is available with a right-click on a couple of tree nodes.

6.2.1 Report explorer floating menu

Right-clicking on the node with the report name as the label produces a floating menu containing the general report functions available.

The following table explains all the options of the floating menu for the report node.

Function Description

Refresh Report Data The datasource behind the report is requested to deliver the data again. You need to confirm the action.

Performance Information Opens the report performance dialog, see 10.10 (Performance information).

Report Options Opens the report options dialog, see 10.12 (Report options).

Report Document Properties Opens the report document properties dialog, see 10.11 (Report document properties).

(33)

6.2.2 Group header/footer floating menu

Right clicking on a node labeled 'Group Header' or 'Group Footer' produces a floating menu as shown on the right.

The following table explains all the options of the floating menu for the details section.

Function Description

Group Expert Opens the group expert dialog, see 10.6 (Group expert).

Delete Group Delete this group from the report.

Hide Section Toggling the option to hide or show a section.

Section Expert Start the Section Expert, see 10.4 (Section expert).

Fit Section Changing the size of a section, automatically removing white-space in the bottom of a section.

Insert Section Below Insert a new section and place it below an existing section.

Select All Section Objects Select all objects in a section. (For example to move, or Delete all at once).

6.2.3 Details section floating menu

Right-clicking on the node labeled "Details" (or at 'Report Header', 'Page Header', 'Details', 'Report Footer' and 'Page Footer') produces a floating menu as shown on the right.

The following table explains all the options of the floating menu for the details section.

Function Description

Hide Section Toggling the option to hide or show a section.

Section Expert Start the Section Expert, see 10.4 (Section expert).

Fit Section Changing the size of a section, automatically removing white-space in the bottom of a section.

Insert Section Below Insert a new section and place it below an existing section.

Select All Section Objects Select all objects in a section. (For example to move, or Delete all at once).

6.2.4 Database field floating menu

Right-clicking on the database field node (such as a node labeled

"OrderHea.Customer_Number") produces a floating menu with database field specific options as shown on the right.

The available options of the menu are explained in the following table.

(34)

Function Description

Field Properties Setting the Field Properties, see 8.4 (Field properties).

Browse Field Data Opens a panel that shows the content of the database field.

Insert Sum Add a sum of a field Summary.

Lock Size/Position Toggle the switch that enables or disabled movement and resizing of objects.

Suppress Toggle the switch to show or hide the object in a report.

Forward Switch the position of the current field in the report layout with the next field. This way the current field will be used/executed after the next field has been processed.

To Front In case objects overlap, an object can be made visible by moving it to the front. For example: Place text to the front, and a picture in the background.

Backward Switch the position of the current field in the report layout with the previous field. This way the current field will be used/executed after the previous field has been processed.

To Back In case objects overlap, an object can be moved to the back.

Size to Font Resizes the object to fit the size of the used font

6.3 Repository explorer

The repository explorer shows information about the datasource location. A tree view shows the stored repositories.

Existing repositories can be renamed, viewed or removed from the system.

The screenshot below shows the information you get when you click the properties button in the Repository Explorer’s toolbar. You can see the name

of the repository, the tables used, the database name, connection string, if applicable the schema name and number of relationships.

You can create a new report based on a stored repository. Repository records are created during report construction via the standard report wizard, or via the Database expert.

6.4 Arrange Objects

The Arrange Objects panel is used to manipulate the size or position of multiple objects in the Report relative to each other.

6.4.1 Resizing objects

Select one or more objects in the Report that you wish to change, select the number of points that you wish to change in the width (X) and/or height (Y)

(35)

change the object(s) sizes accordingly. If you do not enter a value into one of the X or Y dimensions then that dimension is left unchanged.

6.4.2 Moving objects

Select two or more objects in the Report that you wish to change, select the number of points that you wish to change in the left/right (X) and/or top/bottom (Y) dimensions. Select the Distance button and click on the apply button to change the object distances relative to each other. If you do not enter a value into one of the X or Y dimensions then that dimension is left unchanged.

Note when you use the lasso to select multiple objects, the base object is the first selected object in the report explorer.

(36)

7. The Insert menu

The ‘Insert’ menu lists several elements that can be inserted into a report, such as a database field, text or graphical objects.

Except for the first option each choice is also available via a comparable button that can be chosen from the insert button bar.

7.1 Field heading

If a database field is selected in the design window and the option ‘Field Heading’ is clicked from the ‘Insert’ menu, a text object is inserted in the 'Page Header' section. The caption is automatically assumed to be the field name. Change the caption by a right mouse click on the text object and selecting ‘Edit Text’ from the context menu.

See paragraph 4.2.1 for the default setting to automatically place a text object with caption in the 'Page Header' section when a database field is added to the report.

7.2 Summary

First select a field that needs to be summarized. Then choose ‘Sum’

from the ‘Insert’ menu. If we choose this for the field ‘qty_ordered’

from the orderdtl table we will see the dialog on the right.

The available summary options in this dialog are:

Function Description

Sum Sums the values of the field (only works on numeric fields).

Average Show the average value of the field (only works on numeric fields).

Maximum Show the maximum value of the field (only works on numeric fields).

Minimum Show the minimum value of the field (only works on numeric fields).

Count Count the number of times that a certain value occurs.

Distinct Count Count the distinct number of times a value occurs (only works on numeric fields).

You can select where the 'Sum' field is placed. This is normally either a 'Group Footer' or a 'Report Footer'. All possible locations are shown.

If your report does not contain a group – see next paragraph – and you would like to place the summary in a group you can immediately create the group by clicking the 'Insert Group' button.

(37)

7.3 Group

A ‘Group’ is used to divide data into specific sections and for sorting. For example: Group all orders per customer. The panel for adding a group to a report looks like displayed on the right.

The First combo box is used to select the field on which the grouping takes place. The second combo box defines the sorting-order (ascending or descending).

The ‘Group Name Field’ has per default the same value as the field upon which the grouping takes place. Suppose that the Group is defined as on customer number, but the ‘Group Name Field’ needs to be the customer name this can be changed by checking the checkbox ‘Customize Group Name Field’ to change it to the appropriate field.

By checking the checkbox ‘Repeat Group Header On Each Page’ the section with the header-details are repeated on each page.

7.4 Function field

A ‘Function Field’ is usually a field with content that is derived from another field. A ‘Function Field’ is a calculation based on another field, or a different representation of text.

Select ‘Function Field’ from the ‘Insert' menu and move the mouse cursor to the place in the report where the function field needs to be placed. Press the left mouse button down while dragging, to resize the object as appropriate.

After the field has been placed in the report, the

‘Function editor’ window is activated.

The bottom half is the area for editing the function. You can enter the name of the function but it is not required. If you omit entering a name the name will be "FunctionX", where "X" is the number of the function. You can always change the name later. After entering the function contents you can validate the function by clicking the ‘fx’ button.

Use the three panels in the top half to help in building up the function. Double-clicking on an element in the tree will automatically place the

appropriate piece of code in the editor below, in the function.

There is a tree view for selecting available fields (from report or database), one for selecting a specific type of manipulation (expression or statement) and one for selecting functions.

If a function does not return a value (the 'return' statement is not present), the value returned from the function is undetermined.

Example: If we want a function that returns the first 10 characters from the name of a customer we have to do the following:

 Double-click the ‘Return’ expression in the middle tree view. While not shown here the editor part will contain "return" after this.

(38)

 Double-click the function

‘Left(string,number)’ in the ’Available Functions’ tree view. Make sure that the insertion cursor is placed between the brackets of the ‘Return’ statement.

 Edit the second argument of the function (the ‘Number’ behind the comma) to be 10.

 Then edit the first argument (the ‘String’

before the comma) by double-clicking the customer name field in the database fields.

 Change the name of the function to a meaningful name (e.g. CustomerName).

 Check the function by clicking the function-check button in the tool-bar of the function editor window. If no error occurs, the syntax of the function is correct and you can click the OK button to store the function in the report.

7.5 Text object

Select the option ‘Text Object’ and move the mouse cursor to the position in the report where the object needs to go and keep the left mouse button pressed down to create the appropriate size of the object. After releasing the mouse button, text can be edited. Changing the text afterwards can be done by clicking on the object with the right mouse button and choosing ‘Edit Text’ from the context menu or by simply double clicking.

7.6 Line, Box and Picture

Select the option ‘Line’ or ‘Box’ and move the mouse cursor to the position in the report where the line or box has to appear and keep the mouse-button suppressed while giving the line or box the appropriate size.

For adding a picture in a report, first select the picture, then move it to the place in the report and release it in the report by clicking the left mouse button. By default the picture will have the same aspect ratio as the original, and it can now be resized using the mouse.

Images which are stored in a database can also be added. For this, the field which contains the images has to be added to the report.

7.7 Chart object

Select the option ‘Chart Object’ and move the mouse cursor to the position in the report where the chart has to appear and keep the mouse-button suppressed while giving the chart the appropriate size. When the mouse is being released the 'Insert Chart wizard' will appear. See paragraph 3.1 (Adding a chart).

(39)

7.8 Sub-report

A sub-report is a report inside another report.

There are specific reasons for constructing reports this way:

 Show details of data that is not related to each other. For instance because the data is not related, the data-types do not match, or because the data resides in separate databases.

 Combine two or more separate reports into one report.

 Showing the same data multiple times in one report, but with different dimensions.

A sub-report can either be linked, or not be linked to the main report. If the reports are not linked, the information is not related, data from one report is not filtered by reference to the data presented in the other report.

It is possible to link reports by using global variables in the filter functions and function fields. The following example shows a main report with order-header information, linked to a sub-report showing order-details.

 Create a new report based on the table with order-header data and Group the data on order-number.

 Create a second Detail section, the report now shows ‘Details-A’ and ‘Details-B’

 Add a ‘Function field’ to the ‘Details - A’ section. The function will define a global variable named

“iOrder” that gets the value of the current order-number:

dim iOrder as global

let iOrder = {Orderhea.Order_Number}

return iOrder

 Hide section ‘Details -A’. We do this because the result of the function is not meant to be printed in the report.

 Add a sub-report by choosing 'Sub- report' from the 'Insert' menu and place it in section 'Details – B'. The ‘Report Creation Wizard’ is activated for creating the sub-report.

 Select the appropriate order-detail fields (no grouping and filtering).

 Open the sub-report by double clicking it. Add the following 'Filter Function':

dim iOrder as global

return ({OrderDtl.Order_Number} = iOrder)

Defining the global variable iOrder in the filter function is optional here, because it is already defined in the main report, but it is good practice to leave it in for documentation purposes. The filter process will now only use those order-detail records that belong to the current order record that was set in the main report.

(40)

8. The Format menu

Items in the ‘Format’ menu are for changing the visual representation of objects. For most options, a comparable button is placed on the button bar.

8.1 Font

The menu option 'Font' contains a sub-menu in which you can choose to make the field's font bold, italic or underlined or to increase or decrease the font size. All five options also have a button in the tool-bar to accomplish the same goal.

8.2 Lock size/position

With this menu option – also available as tool-bar button – you can lock the size and position of the object. This means you cannot move the field with the mouse or cursor keys. The chosen state is saved for the object in the report.

8.3 Suppress field

This option can be selected to suppress a selected field. The option is also available via a tool-bar button.

Remember that to conditionally suppress an object you can write a function via the field properties dialog.

8.4 Field properties

Depending on the type of object that is selected, the panel to change settings will have different tab pages.

8.4.1 Common

The first input field allows the name of the object to be changed. The name of the object does not need to be unique.

If the object refers to a function the name of the function and the name of the object might be different and it is up to you to decide whether you want to keep them in sync or not.

The second input field allows for adding a tooltip text. A tooltip is the text that will be visible when hovering over the object with the mouse cursor.

A value is not required.

With the next four input controls you can change the size and/or location of an object. The value is internally stored in TWIPS which means that the shown value later is most likely to be slightly different due to rounding.

(41)

The data in an object can be shown as aligned to the left, to the right or in the center. The setting can be specified via the combo-form or via the result of a function. An example of a function to align the field is:

if ({OrderHea.Order_Number} < 150) then return drHorzAlignmentLeft

else

return drHorzAlignmentRight end

By checking the checkbox ‘Suppress’, the object can be hidden in the report. Suppression can be conditionally realized by using a function. Click the button on the right-side and enter a function. An example of a function on how to suppress a field:

if ({OrderDtl.Qty_Ordered} = 0) then return true

else

return false end

Checking the ‘Lock Position and Size’ option locks the object so that size and location cannot be changed until the object is unlocked again.

8.4.2 HTML

The ‘HTML’ tab page contains options that are specific for HTML output of reports.

‘Hyperlink id’ is meant for integration. Setting this value will create a DIV element when HTML output is chosen.

For further information on integration refer to the ‘DataFlex Reports Developer Guide’.

8.4.3 Border

On the ‘Border’ tab page the settings of the object border can be changed. This tab page is not available for all objects.

The available settings of border line styles are:

 None (drBorderNone)

 Single (drBorderSingle)

 Double (drBorderDouble)

 Dashed (drBorderDashed)

 Dotted (drBorderDotted)

A border-line style can be conditionally defined, using a function. Click the button on the right-hand side to add apply a function.

An example of using a function to define a border:

(42)

if ({OrderDtl.Qty_Ordered} < 1) then return drBorderSingle

else

return drBorderNone end

Pick one of the predefined colors from the drop-down or select a custom color from the RGB color range to set the color of the borders.

Setting the color can also be done by using a function. Click the button to add a function.

An example of a function or setting a color:

if ({OrderDtl.Qty_Ordered} < 1) then return (drRed)

else

return (drBlack) end

The background color can be set in the following styles:

 Solid (drSolidGradient)

 Horizontal (drHorizontalGradient)

 Vertical (drVerticalGradient)

Setting the gradient style can also be done by using a function. Click the button to add a function.

An example of a function or setting a gradient style:

if ({OrderDtl.Qty_Ordered} < 1) then return (drSolid)

else

return (drHorizontalGradient) end

Pick one of the predefined colors from the drop-down or select a custom color from the RGB color range to set the color of the background. When the background-style is set to ‘Solid’ only the primary color is used. When a gradient is selected the ‘End color’ defines the color on the right or bottom of the gradient. Setting the colors can also be done by using a function. See the example above.

The bottom of the panel presents a preview sample of the result.

(43)

8.4.4 Font

The ‘Font’ tab page contains settings that control fonts: Size, color and styles. This tab page is not available for all objects.

The first three combo boxes in the panel are for defining the font, size and color.

The font, the size and the color of the font can be defined conditionally by using a function.

An example of changing font settings:

if ({OrderDtl.Qty_Ordered} < 1) then return ("Courier")

else

return ("Verdana") end

Note: make sure the named font is available on your development and/or the deployment machine.

For the styles, checkboxes can be used to display the font as ‘Bold’, ‘Italic’, ‘Underline’, and/or ‘Strikethrough’.

These setting can be conditionally defined by using a function as well.

An example of using a function for setting the font style:

if ({OrderDtl.Qty_Ordered} < 1) then return (true)

else

return (false) end

The bottom of the panel shows an example of the result.

References

Related documents

[r]

All models offer impressive scalability, including up to 8GB of memory and a choice of high- performance hard disk drives with an internal storage capacity of 600GB (two

However, if the flight schedule becomes tight, which means more aircraft need to use the runway within the same time period, the gap between the rolling horizon method and the

Quality: We measure quality (Q in our formal model) by observing the average number of citations received by a scientist for all the papers he or she published in a given

As consequence, this paper contains a study on the effect of the rotor bar number on the torque (average and quality) of five-phase induction machines under different supply

A prospective study of thirty myofascial trigger points in upper trapezius were considered to determine the effectiveness of transcutaneous electrical nerve stimulation and

Abstract In this paper the well-known minimax theorems of Wald, Ville and Von Neumann are generalized under weaker topological conditions on the payoff function ƒ and/or extended

service imposed upon an employee is set aside or declared or rendered void in consequence of or by a decision of a court of law and the disciplinary authority, on a consideration