Data Export

Captured data is exported by an automatic Export client. If you don’t have an Export client installed, check Installing Export Client.

Configuring Export at the Export Client Level

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
        <sectionGroup name="ExportSettingsGroup">
          <section name="ExportSettings" type="SsiExportClient.ExportLogic.LocalExportSettings, SsiExportClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowLocation="true" allowDefinition="Everywhere"/>
        </sectionGroup>
  </configSections>

  <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
  </startup>

  <appSettings>
        <add key="ServerIp" value="127.0.0.1" />
        <add key="ServerPort" value="12543" />
        <add key="UserName" value="generaluser" />
        <add key="Password" value="user" />
        <add key="ConnectionRetrySeconds" value="120" />
        <add key="MaxWorkerCount" value="-1" />
        <add key="LogRoot" value="${specialfolder:folder=LocalApplicationData}" />
        <add key="LogPath" value="${CompanyName}/ExportClient/Logs" />
        <add key="LogLayout" value="${longdate} [${processid}-${threadid}] ${level:uppercase=true} | ${message} ${exception:format=tostring}" />
        <add key="MinLogLevel" value="Debug" />
  </appSettings>

  <ExportSettingsGroup>
        <ExportSettings>
          <xmlExport exportFolder="%temp%/SsiExportClient/XML Export"   />
          <csvExport exportFolder="%temp%/SsiExportClient/CSV Export"   />
          <tiffExport exportFolder="%temp%/SsiExportClient/TIFF Export"   />
          <pdfExport exportFolder="%temp%/SsiExportClient/PDF Export"   />
        </ExportSettings>
  </ExportSettingsGroup>

</configuration>

AppSettings

ServerIp, ServerPort, UserName and Password are set up by the Setup wizard, but can be later changed here. The Export client uses these setting to connect to the Application Server

ExportSettingsGroup

<xmlExport exportFolder="%temp%/SsiExportClient/XML Export"/>

By default the with the PDF, TIFF, CSV and XML export options the output files are saved in the Windows %temp% folder. This is a folder that the application is guaranteed to have access to. You will probably want to change the export path, e.g. exportFolder="C:\SsiExportClient\XML Export"

Tip

The Path expression pattern defined in Batch type settings is added to exportFolder to get the full export path. If the Path expression pattern starts with a drive letter e.g. C:\Export or a network path, e.g. \\network share\, then the export folder defined here is ignored and the files are exported to the folder defined by the Path expression pattern.

The intention of this design is to let users define their export folder from the Admin panel only without modifying the local Export client config file.

Configuring Export at the Batch Type Level

Export settings are configured at the Batch type level. From the Admin Panel click Edit Batch Type and select the Batch type you want to configure.

Tip

One batch type can be configured for export to multiple destinations, e.g. SQL and PDF.

Exporting to SQL databases

../_images/export-sql.png

To enable export to SQL select Activate SQL Database Export in the SQL Database tab in the Export Settings tab.

Database connection type: Select between SQL Server and ODBC. The connection string format has to match the connection type selected.

Database connections string: Connection string for your export database. Here are some examples:
  • SQL Server connection string -
    • Windows authentication: Server=.\SQLEXPRESS;Database=myDataBase;Trusted_Connection=True;
    • SQL Server authentication: Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
  • ODBC connection string -
    • Windows authentication: Driver={SQL Server};Server=myServerAddress;Database=myDataBase;
    • SQL Server authentication: Driver={SQL Server Native Client 11.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Database export mode: Select between: Fixed and Dynamic
  • Fixed
    The fixed mode does not use the information from the Document Form Definition (DFD). Instead, several standard tables are created in the database specified by the connection string. These tables are the following:
    • Document - the columns are BatchType, BatchId, DocId, DocType
    • Field - the columns are SourceImageId, FieldName (that is the field ID in the DFD), FieldValue, FieldType
    • TableCell - the columns are TableName, ColumnName (that is the column ID in the DFD), ColumnTitle, LineIndex, CellValue, CellType
    • SourceImagePath - the columns are DocId, ImagePath, PageNumber
  • Dynamic
    The dynamic mode exports the information from the DFD (the values of the exportable fields). The name of the SQL table for export is determined by the DFD property “SQL Name”. By default, it is ssi_<DFD name>_<8 hex digits>. The columns in the export table are the following:
    • migration
    • file_path - this is the path and name of the source file
    • DFD_name
    • LinkID - this is a unique ID for documents, that means records with same LinkID are from the same document
    • all fields and line items of the Document Form Definition (DFD). Each table row contains information about one line item.

Warning

You can not use the SmartSoft Invoices application database (SsiServerDb) as an export database.

Tip

Make sure you provide the user account under which the Export client is running with access to the export database.

Exporting to CSV

Path expression pattern: Here you can define the path and the name of the exported file. Use macros to dynamically change the name and location of the file, e.g. $(CurrentDate-yyyy-MM-dd)\$(Field-FT_INVOICE_NUM)-$(Field-FT_TOTAL) will result in export files grouped in folders by date and the file names will contain the invoice number, followed by a dash, followed by the invoice amount.

Date Format:

Export the entire batch to a single XML file:

Include field headers: If selected the a header row will be included in the CSV with the field IDs as defined in the Document Form Definition

Include source file path: The path to the

To enable export to CSV select Activate CSV Export in the CSV tab in the Export Settings tab.

Exporting to PDF

To enable export to PDF select Activate PDF Export in the PDF tab in the Export Settings tab.

Path expression pattern: Here you can define the path and the name of the exported file. Use macros to dynamically change the name and location of the file, e.g. $(CurrentDate-yyyy-MM-dd)\$(Field-FT_INVOICE_NUM)-$(Field-FT_TOTAL) will result in export files grouped in folders by date and the file names will contain the invoice number, followed by a dash, followed by the invoice amount.

Exporting to XML

Path expression pattern: Here you can define the path and the name of the exported file. Use macros to dynamically change the name and location of the file, e.g. $(CurrentDate-yyyy-MM-dd)\$(Field-FT_INVOICE_NUM)-$(Field-FT_TOTAL) will result in export files grouped in folders by date and the file names will contain the invoice number, followed by a dash, followed by the invoice amount.

Date Format:

Export the entire batch to a single XML file:

To enable export to XML select Activate XML Export in the XML tab in the Export Settings tab.

Exporting to TIFF

Path expression pattern: Here you can define the path and the name of the exported file. Use macros to dynamically change the name and location of the file, e.g. $(CurrentDate-yyyy-MM-dd)\$(Field-FT_INVOICE_NUM)-$(Field-FT_TOTAL) will result in export files grouped in folders by date and the file names will contain the invoice number, followed by a dash, followed by the invoice amount.

Page Range:

To enable export to TIFF select Activate TIFF Export in the TIFF tab in the Export Settings tab.