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.
-
Launch Genero Studio for Report Writer.
Genero Studio opens. By default, the Swift configuration is
selected.
-
Open the project OrderReportBAMSwift.4pw.
-
Open a Terminal window.
-
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.
-
Verify the entries in the file module.modulemap.
To find the file in the OrderReportBAMSwift project, expand .
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.
-
Install the SQlite ODBC package.
In the Terminal window, enter: brew install sqliteodbc.
-
Configure the database connection.
-
Select .
-
Select the Demo Swift Database Connection environment set.
-
Find the value of UNIXODBC_DSN.
This value should read DSN=officestore_sqlite
. If the value has changed, make
note of the change.
-
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
-
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
-
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.
-
Close the Genero Configuration Management window.
-
In Genero Studio, select .
A new Terminal window opens, configured for Genero Report Writer.
-
In the new Terminal window, start the Genero Report Writer daemon.
From the command line, type greportwriter -l 7000
. Press Enter.
-
From Genero Studio, execute the ReportLauncher application.
The application runs. The OrderReport report displays.