Tuesday, December 23, 2014

Connecting to Foxhound 3 With Crystal Reports

The Foxhound database is completely open for read-only access via SQL queries; it's one of the hallmarks of Foxhound:

Open Access: read-only SQL access to all the historical data pertaining to your database: it's your data, you own it. The Foxhound FAQ contains sample queries, and to make your own queries easier to write important internal primary key values are displayed together with the data on the Monitor and other pages; e.g., sampling_id, sample_set_number and the new connection_id_string.
You can use the ADHOC / SQL user id and password to connect to the Foxhound database via ISQL and Sybase Central. For example, here's what the Start - All Programs - Foxhound3 - Tools - Adhoc Query Foxhound Database shortcut uses:
ECHO Start DBISQL for Adhoc Queries


IF EXIST "%SQLANY16%\Bin64\dbisql.com" ( GOTO use_Bin64 )
GOTO use_Bin32
"%SQLANY16%\Bin64\dbisql.com" -c "ENG=foxhound3; DBN=f; UID=ADHOC; PWD=SQL; CON=Foxhound3-ADHOC" 
GOTO end

"%SQLANY16%\Bin32\dbisql.com" -c "ENG=foxhound3; DBN=f; UID=ADHOC; PWD=SQL; CON=Foxhound3-ADHOC" 

The Foxhound FAQ contains more examples:
When it comes to using a commercial report writer like SAP Crystal Reports it's easiest if you first create an ODBC DSN:
User ID:        ADHOC
Password:       SQL
Server name:    foxhound3
Database name:  f
Then you can plunge right into the Crystal Reports wizard with the new DSN:
One last tip: It's probably easier to deal with Foxhound's Views than the base tables (the view names are friendlier)...