Configure Genero Studio for Swift

Follow this procedure to complete the Swift configuration.

Before you begin:

  • You have installed and licensed Genero Report Writer.
  • You have the Homebrew package manager installed. The software can be found on the Homebrew web site.

These instructions use the Homebrew package manager for macOS™ to install unixODBC and the SQLite ODBC driver. If a package is already installed for your operating system, you can skip that step.

Tip: If you are unsure, run the command. You will not hurt your system.
  1. Launch Genero Studio for Report Writer.
    Genero Studio opens. By default, the Swift configuration is selected.
  2. Open the project OrderReportBAMSwift.4pw.
  3. Open a Terminal window.
  4. Install the unixODBC package.
    From the command line, enter: brew install unixodbc. Take note of the path it creates, as you will need this information later.
  5. Verify the entries in the file module.modulemap.
    To find the file in the OrderReportBAMSwift project, expand Reports > reporting.
    Verify that the paths listed in the file match the path of your unixODBC installation. If they differ (specifically look at the version number), update the file and save your changes.
  6. Install the SQlite ODBC package.
    In the Terminal window, enter: brew install sqliteodbc.
  7. Configure the database connection.
    1. Select Tools > Genero Configurations.
    2. Select the Demo Swift Database Connection environment set.
    3. Find the value of UNIXODBC_DSN.
      This value should read DSN=officestore_sqlite. If the value has changed, make note of the change.
    4. Update /usr/local/etc/odbcinst.ini to include the following:
      [SQLITE3]
      Description=SQLite ODBC Driver
      Driver=/usr/local/lib/libsqlite3odbc.so
      Setup=/usr/local/lib/libsqlite3odbc.so
      Threading=2
      
    5. Update /usr/local/etc/odbc.ini to include the following:
      [officestore_sqlite]
      Description=The Officestore SQLite database
      Driver=SQLITE3
      Database=/Users/xxx/genero-report-writer-files/samples/OfficeStoreRes/database-sqlite/officestore.db
    6. Check the database connection using the unixODBC command-line interactive SQL tool. In the Terminal window, enter: isql officestore_sqlite.
      You successfully connect to a database and are presented a SQL prompt. Enter quit to exit, then close the terminal window.
    7. Close the Genero Configuration Management window.
  8. In Genero Studio, select Tools > Genero tools > Genero Workplace Window.
    A new Terminal window opens, configured for Genero Report Writer.
  9. In the new Terminal window, start the Genero Report Writer daemon.
    From the command line, type greportwriter -l 7000. Press Enter.
  10. From Genero Studio, execute the ReportLauncher application.

The application runs. The OrderReport report displays.