chapter 23 creating reports with ifix - pudn.comread.pudn.com/downloads203/doc/954495/student...

22
154 Student Guide 23. Creating Reports with iFIX ________________________________ Chapter 23 Creating Reports with iFIX Copyright © 2001, Intellution, Inc. 23-1

Upload: lamanh

Post on 23-Aug-2018

258 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23. Creating Reports with iFIX ________________________________

Chapter 23

Creating Reports with iFIX

Copyright © 2001, Intellution, Inc. 23-1

Page 2: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23. Creating Reports with iFIX _________________________________ Section Objectives Detailed reports are important tools for reviewing the performance of a process. iFIX allows the use of any third-party reporting application that supports ODBC queries to make reports. This includes Microsoft Excel, Microsoft Access, and Seagate Crystal Reports™. Using any of these tools, you can create customized reports based on iFIX real-time and historical data. When you use iFIX real-time data, you generate the report with current data extracted from a FIX database. When you create a report using iFIX historical data, you generate the report based on data gathered over a period of time. Once generated, reports can be printed, displayed within the reporting tool, or displayed in the Intellution WorkSpace. Many iFIX users take advantage of Seagate Crystal Reports™ for their reporting solution. For this reason, the Crystal Reports v8.0 run-time DLL installation is included on the iFIX CD. These DLLs allow you to enable the target system to execute Crystal Reports without requiring a development copy to reside on each node. This section covers the options for creating reports with iFIX. The topic of reporting is covered in detail in Intellution’s Advanced iFIX training course.

Copyright © 2001, Intellution, Inc. 23-2

Page 3: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.1. Report Distribution Considerations________________________

A. Generating Report Output

• Send report to printer

• E-mail report as attachment to distribution list

• Post report document on file server

• Post report in HTML format on web server

• View report within some application

- Intellution WorkSpace, Word, Excel, Access, Crystal Reports, etc.

B. Considerations when choosing output format and mechanism for delivery

• Archiving report for future reference

- paper file, microfiche, tape backup, CD-ROM / optical media backup

• Automatically purging old / outdated reports from user computers

• Network Traffic

- e-mailing reports takes increases traffic and fills mail servers

• Remote / Mobile issues

- availability to users on intranet and for customers/partners on the internet

- availability to remote / dial-in users

• Security

C. Steps to Reporting with iFIX

• Create the report

• Determine the report output/display format

• Generate the report

Copyright © 2001, Intellution, Inc. 23-3

Page 4: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2. Creating Reports _______________________________________

A. Introduction to ODBC

• Open Database Connectivity - specification written by Microsoft

• It provides standard methods for accessing, viewing, and modifying data contained in relational databases

• Before ODBC, applications had to be written to communicate with a specific relational database

B. ODBC Access Information

• Multiple applications can use the same ODBC driver

• A single ODBC driver can access multiple databases (of the same type)

• The Windows NT ODBC driver manager handles the multiple requests

• ODBC can connect to a database residing on the local node or over the network

- the application requesting the interface to the database uses the same ODBC format to communicate with the ODBC driver regardless whether the database is local or remote

C. iFIX ODBC drivers

• Two drivers developed by Intellution

- Intellution FIX Dynamics RealTime Driver

- Intellution FIX Dynamics Historical Driver

• Developed so iFIX appears as an ODBC data source to other programs

• Use these data sources to display iFIX data in other applications:

- Crystal Reports combines data from many different sources

- Excel charts / graphs

- link iFIX tables within Access

- any software that can interface via ODBC

Copyright © 2001, Intellution, Inc. 23-4

Page 5: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2. Creating Reports ________________________________________

Figure 23-1: Windows NT Control Panel

Figure 23-2: iFIX ODBC Drivers

Copyright © 2001, Intellution, Inc. 23-5

Page 6: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.1. Creating Reports with Excel ____________________________

A. Populating Cells with iFIX Data

• Excel treats iFIX data as “external data”

• From within Excel, from the Data menu, select Get External Data – New Database Query

- this is the signal to Excel to get data from an ODBC data source

- see Figure 23-3

• Select the iFIX Real Time data or the iFIX Historical Data

- Excel will query the data source and display the available data options

- Figure 23-4 shows Real Time data selections

• Select the fields to be displayed in Excel

• Select filtering options and sorting options

• Excel populates the spreadsheet with the query results

- see Figure 23-6

Copyright © 2001, Intellution, Inc. 23-6

Page 7: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.1. Creating Reports with Excel_____________________________

Figure 23-3: Selecting an ODBC Data Source in Excel

Figure 23-4: Selecting Real Time Data Query

Copyright © 2001, Intellution, Inc. 23-7

Page 8: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.1. Creating Reports with Excel_____________________________

B. Configuring the Data in Excel

• Using this method provides a snap shot of the iFIX data

• The data can be updated using several methods

- Excel VBA code can be written to update the query

- Right-click any cell of the iFIX data and select Refresh Data

• The data can be continuously updated using several methods

- Excel VBA code can be written to update the query

- Right-click any cell of the iFIX data and select Data Range Properties

see Figure 23-5 ◊

◊ the data can be configured to be refreshed every 1 to 32767 minutes and/or whenever the file is opened

Figure 23-5: Configuring the External Data Properties

Copyright © 2001, Intellution, Inc. 23-8

Page 9: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.1. Creating Reports with Excel_____________________________

Figure 23-6: Displaying Real Time Data

Copyright © 2001, Intellution, Inc. 23-9

Page 10: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.2. Creating Reports with Access __________________________

A. Retrieving Static Data

• Manually import data from iFIX ODBC data source

- this is similar to the method used to display data in Excel

• From within Access, from the Insert menu, select Table

- see Figure 23-7

• Select Import Table

• Select ODBC Databases as the file type to be inserted

- this is the signal to Access to get data from an ODBC data source

- see Figure 23-8

• Select the iFIX Real Time data or the iFIX Historical Data

- Access will query the data source and display the available data options

- Figure 23-9 shows Real Time data selections

• Access creates a new table displaying the data that is currently in the PDB

Figure 23-7: Importing External Data into Access

Copyright © 2001, Intellution, Inc. 23-10

Page 11: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.2. Creating Reports with Access ___________________________

Figure 23-8: Selecting an ODBC Data Source in Access

Figure 23-9: Selecting Real Time Data Query

Copyright © 2001, Intellution, Inc. 23-11

Page 12: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.2. Creating Reports with Access ___________________________

B. Linking to iFIX data in real time

• Access provides the ability to link a table to a data source

- Use Queries to view data rather than viewing table directly

• From within Access, from the Insert menu, select Table

- see Figure 23-10

• Select Link Table

• Select ODBC Databases as the file type to be inserted

- this is the signal to Access to get data from an ODBC data source

• Select the iFIX Real Time data or the iFIX Historical Data

- Access will query the data source and display the available data options

• Access creates a new link table displaying the data that is in the PDB

Figure 23-10: Linking External Data to Access

Copyright © 2001, Intellution, Inc. 23-12

Page 13: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.2. Creating Reports with Access ___________________________

Figure 23-11: Example of a Linked Table

Copyright © 2001, Intellution, Inc. 23-13

Page 14: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.2. Creating Reports with Access ___________________________

C. Creating Queries in Access that use iFIX data

• Use queries to view, change, and analyze data

- calculate sum, count, or other type of total

- group by categories in a cross tab fashion

• Use the Query Wizard to selected from tables

- see Figure 23-12

• Fine tune Query using Design View and SQL View

Copyright © 2001, Intellution, Inc. 23-14

Page 15: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.2. Creating Reports with Access ___________________________

Figure 23-12: Access Query Wizard Example

Copyright © 2001, Intellution, Inc. 23-15

Page 16: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.2. Creating Reports with Access ___________________________

D. Creating Reports from Access Queries

• Use Report Wizard to quickly lay out a report

- see Figure 23-13

• Select grouping, filtering, and sorting options

Figure 23-13: Access Report Wizard Example

Copyright © 2001, Intellution, Inc. 23-16

Page 17: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.2. Creating Reports with Access ___________________________

Figure 23-14: Access Report Example

Copyright © 2001, Intellution, Inc. 23-17

Page 18: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.3. Creating Reports with Crystal Reports ___________________

A. Crystal Report Designer creates reports

• Use existing Queries or make new queries specific to the report

• Use Report Expert to choose template and quickly lay out a report

• Customize Report using Design View

- see Figure 23-15

• Preview report development using Preview

- see Figure 23-16

Figure 23-15: Crystal Reports Development – Design Mode

Copyright © 2001, Intellution, Inc. 23-18

Page 19: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.3. Creating Reports with Crystal Reports ____________________

Figure 23-16: Crystal Reports Development – Preview Mode

Copyright © 2001, Intellution, Inc. 23-19

Page 20: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2.3. Creating Reports with Crystal Reports ____________________

B. Crystal Reports View Designer

• Choose Data Source

- Data File, Query, SQL/ODBC, Oracle, NT Event Log, etc.

• Select Database Fields

• Choose Sort Criteria

• Choose Total / SubTotal Options

- Sum, Average, Max, Min, Count, Sample Variance, Sample Standard Deviation, Population Variance, Population Standard Deviation, Distinct Count

• Select TopN, BottomN records

• Select from Graph Templates

- Bar Chart, Stacked Bar Chart, Percentage Bar, Line, Area, Pie, Multiple, Pie, Weighted Pie, or Custom

• Choose Selection Criteria

• Choose from Style Templates

Figure 23-17: Crystal Reports Report Gallery

Copyright © 2001, Intellution, Inc. 23-20

Page 21: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

154 Student Guide

23.2.3. Creating Reports with Crystal Reports ____________________

Figure 23-18: Crystal Reports Report Designer Create Report Expert

Copyright © 2001, Intellution, Inc. 23-21

Page 22: Chapter 23 Creating Reports with iFIX - pudn.comread.pudn.com/downloads203/doc/954495/Student Guide/23_Creatin…Intellution Dynamics iFIX 23. Creating Reports with iFIX ... When you

Intellution Dynamics iFIX

23.2. Creating Reports ________________________________________

this page intentionally contains no data

Copyright © 2001, Intellution, Inc. 23-22