### Using DataImporter.exe

Data Importer Settings dialog box

The DataImporter.exe tool monitors a specified directory on a local computer or a network for these types of files: DMP, CSV, DMO, XML, RTF, Mitutoyo text, Generic Excel Format, Quindos, Blade (BSF), Temporary File (Tmp), Excel (XLS), or Romer Measurement Report (html). See "Importing Existing Statistical Data".

Data Importer use a defined interval to read the data from the monitored file(s) and import that data into the database defined in Destination Database.

You can re-access the database at any time inside DataPage+ to get at the new data by using the Refresh icon.

This tool resides in the directory where you installed DataPage+. To use it, run DataImporter.exe, fill out the resulting dialog box, and then either click the Check button to check the monitored directory now, or click the OK button to automatically check the monitored directory using the time interval in the Auto Check area. Once you run this program, an orange icon appears in your system tray:

To completely exit the Data Importer dialog box, right-click on the tool in the system tray and choose Exit.

Dialog Box Items

The dialog box contains two tabs:

- General

- Miscellaneous

The General tab contains following items:

File Monitor: This area defines the directory to monitor for any of the selected file types. The default directory to monitor is:
C:\Program Files\WAI\DataPage+ 2011\ForStatsFiles.

You can specify the directory to monitor by using the Browse... button.

You can monitor any of these supported statistics files: DMP, CSV, DMO, XML, RTF, Mitutoyo text, Generic Excel Format, Quindos, Blade (BSF), Tmp File, Excel and Tube Inspection Report.

The Customize... button lets you customize the import settings for these file types. It uses the same interface as the data import wizard discussed in the "Importing Existing Statistical Data" topic.

The tool will look in the Path to Monitor directory at the specified interval, and if it detects any new files, it will send the data in those files to the database defined in the Destination Database area.

Run mode: This area defines how the application runs, either as an application or as a service:

Windows Application: This runs DataImporter as a Windows application by launching DataImporter.exe.

Windows Service: This option runs DataImporter by creating a service called DataImporterService. In the Window's Services dialog box, the Startup Type is automatic and the Log On As item set to Local System. If you use this mode, in the Data Importer Settings dialog box, in the Auto Check area, the Check for files every_____ minutes check box is marked and disabled and the Destination Database area, the Always use the same database with DataPage+ is also unavailable. For more information on Windows Service, see "Running DataImporter as a Windows Service".

Start: This starts the service.

Stop: This halts the service.

Restart: This restarts the service.

Auto Check: This area defines whether or not to automatically check the monitored directory using the defined time interval. Set the time interval as a value in the edit box and select the time component (seconds, minutes, hours) from the drop down list.

Destination Database: This lets you choose the database to which the tool will send the data in the statistics file. It contains these options:

- Always use the same database with DataPage+ - This will use the same database that DataPage+ is currently configured to use.

- Specify a Different Database - The tool will use a different database specified by using the ... browse button. Clicking this button opens the Database Connection Properties dialog box. For a description of this dialog box, see "Connecting to a Database".

The Miscellaneous tab contains following items:

Miscellaneous tab screen

File Disposition: When a statistics file is detected in the monitored directory, and after the data has been imported into the specified database, you can use this area to tell the tool what to do with the file. You must use one of these items so that the file is no longer monitored once it has been processed. The available options are:

- Move to directory - This moves the statistics file out of the monitored directory and into the new directory.

- Delete - This deletes the statistics file.

- Rename to Extension - This renames the statistics file to a different extension.

Post-check event: This area lets you automatically send an export of MDI files (XML files) to a specified directory as well as generate and send a report and a notification email.

- Export MDI files - If marked DataPage+ exports XML files for the most recently handled statistics files. The default directory is:
  C:\Program Files\WAI\DataPage+ 2011\ForExportMDIFiles

- Browse - This changes the export directory for the exported MDI files.

- Call ReportDelivery to generate report or EMail - If marked, DataPage+ generates a report and sends an email of the most recently handled statistics files, using the settings defined in this area's Customize button. This is used to inform someone that the incoming data contains out-of-tolerance measurements and generate a report of the incoming data.

- Customize - This button displays the Report Delivery Configuration dialog box. See "Customizing Report and Email Settings" below.

Start when login the system: This determines whether or not to display this tool's user interface whenever you log in onto the system.

Show this dialog when startup: This determines whether or not to display this tool's user interface whenever you run the .exe file. If the check box is cleared, the user interface is hidden while the tool continues to run in the background. You can tell it is running because an icon appears in the system tray. It continues to use the settings already defined. To access the tool's settings at any time, right-click on the icon in the system tray and choose Settings.

Languages list - Choose a language from the drop-down list if you want to change the language used for the dialog box. It will immediately reopen in the selected language.

Apply: This runs an immediate check on the monitored directory. You can also run a check from the system tray icon, by right-clicking on it and choosing Check.

OK: This closes the tool, placing it in a hidden mode while it continues to monitor the defined directory in the background. To permanently close the tool, even from the system tray, right-click on the icon and choose Exit.

Customizing Report and Email Settings

Report Delivery Configuration dialog box

This dialog box appears when you click the Customize... button in the Post-check event area. This is identical to the Report Delivery tool.

It contains these areas:

Email Engine:

SMTP Server: This defines the mail server to use for sending the email message.

Port: Defines the server port to use for outgoing messages.

Email Address: This is the email address that will appear in the generated email message's From field.

Password: This defines the password to access the SMTP server.

Require log on using Secure Password Authentication (SPA): Mark this check box if your SMTP server uses the SPA protocol.

Select Part: This lets you choose from the list of parts that are stored in the DataPage+ database. Selecting a part shows all the WebReporter reports used by that part in the Existing Reports and Selected Reports lists. It also enables the Specified notification check box and button.

Specified notification: The check box determines whether or not an email is automatically generated and sent whenever reports related to the selected part are modified by DataPage+. You can mark this check box for more than one part. Any selected part with a marked check box, will have automatically send the report by email whenever this tool detects a change in the WebReport. Clicking the Specified Notification button displays the Email Recipient dialog box for this check box. While this dialog is identical to the one discussed in the General Notification below, it holds different information.

Existing Reports: This list contains all the reports for the selected part in the database. If nothing is selected from Select Part, it contains all the reports for all parts in the database.

Selected Reports: This list shows the reports chosen to use as templates to generate automatic reports using the incoming data. If any reports are listed here they generate the report or reports from the incoming data. Generated reports will be saved in the folder defined in the Directory box and sent out to email addresses as defined in the Email Recipient dialog box.

Directory: This specifies the directory to which generated reports will be saved. The default directory is here:
C:\Users\<user>\AppData\Roaming\DataPage+\Reports from DataImporter where <user> represents your Window's user name.

Save as type: This defines the type of report format to use for the generated reports. The available options include:

- PDF

- XPS

- ReportViewer

- Excel - If you select this option, an additional Excel Report area appears so you can define the exact type of report to export as an XLS file.

These are the same items that exist in the Save As list of the Excel Output dialog box. See "To Excel".

For PDF files, you must have a third party utility called PDFCreator installed on your computer. If needed, you can install this utility by running the PDFCreator setup executable located in the PDFCreator subdirectory of your DataPage+ installation package.

General Notification - If marked, this sends an email notification using the settings in this Email Settings dialog box for any reports in the Selected Reports list. The Email Settings dialog is accessible by clicking the browse button next to this check box:

Email Recipient dialog box

Email to: This defines the main recipient's email address.

cc: This defines an alternate recipient email address to receive a copy of the email message.

Subject: This defines the text that appears in the email message's subject field.

Require report attachment: Marking this check box includes any generated reports as an attachment to the email.

Header: This defines the initial body text of the generated email text that appears before any other reported information.

Languages list - Choose a language from the drop-down list if you want to change the language used for the dialog box. It will immediately reopen in the selected language.

Multiple Instances

You can run multiple instances of DataImporter. The main reason for doing this on one PC is to import data into different databases at one time.

Whenever you launch an additional instance of DataImporter, you'll get a message that asks if you want to launch the new instance. If you click Yes, the additional instance launches with these differences:

- The instance number appears in the title bar and in any tool tips for that instance:

- A Copy from button appears in the File Monitor area. This button copy the dialog box settings from the first instance of DataImporter to the current instance.

For example, using the example image below, you could have the first instance monitor a ForStatsFiles folder (A), and after it imports data to Database 1, it then moves the processed files into the TemporaryFiles folder (B). The second instance could be set to monitor the TemporaryFiles folder (C), and after it imports data into Database 2, it moves the processed files into the ForHandlerFiles folder (D).

Data Importer for Database 1 | Data Importer instance for Database 2