7.4

Table Of Contents
document and data to merge and print automatically. In this case someone or something must query the database and extract
the data that will populate the Design Document.
We can imagine two basic scenarios. In the first one, we can imagine someone in a print shop who needs to use data from a
database to print a bunch of personalized letters using PlanetPress Design. That person opens a Design document and uses
the Data Selector to select a database. By making a connection to the database, its structure can be accessed and it becomes
possible to determine how data is to be pulled into PlanetPress Design. The process actually pulls data into PlanetPress Design
and lets the print shop employee visualize and print the data on the personalized letters.
The second scenario involves PlanetPress Suite Workflow Tool. In this case, PlanetPress Database action task takes the place
of the print shop employee and performs the database query automatically. The task generates a PlanetPress Design com-
patible data file that it passes to the following task, be it another action task, or any output task.
Bear the following in mind:
l The person or plugin performing the query must have full access to the database.
l The data is extracted at the time of the query. A new query must be performed whenever the data needs to be
updated.
l Any changes to the structure of the database may have an impact on automated data querying tasks.
l You must have the proper ODBC driver installed to use this emulation.
Database emulation supports SQL ANSI 92 or higher, and supports the following data types: string, integer, floating point, all
date formats, and text-only MEMO. It does not support any binary data types such as Binary Large Object (BLOB), images,
sound files, and MEMO data that includes binary data.
Database emulation requires version 2.5 or higher of Microsoft Data Access Components (MDAC), including JET 4.0, and you
can save database emulation configurations to a file.
To set up a database emulation:
1. Choose Tools | Open Active Data.
2. In the Data Selector, locate the Emulation box and select Database.
3. Click the Database Emulation Configuration button.
4. Associate a database.
Microsoft Access Database or dBase file
Database: Enter the path of the Microsoft Access database or dBase file, or click the Browse button to the right of the
box to navigate to, the database file. Recall that a Microsoft Access database file bears the extension .mdb, and a
dBase file bears the extension .dbf. If the file is a dBase file, you must specify the folder that contains the .dbf file. The
folder in this case is considered to be the database, and the individual .dbf file a table in the database. Once you enter
the path, the Table/query name box updates to reflect the tables and queries available in the selected database.
ODBC Data Source
ODBC Data Source: Click to connect to an ODBC Data Source. Use the Select Data Source dialog box that appears to
select an existing Data Source or set up a new one. When you exit the Select Data Source dialog box, the Database box
updates to display the connection string it uses to connect to the database, and the Table/query name box updates to
reflect the tables and queries available in the selected database.
5. Click Edit SQL to create the SQL query by hand to define the SQL query that retrieves the data your document
requires.
6. Set the properties that define a record set.
Condition: Select the condition that signals the end of a record set. Three possibilities exist: create a new record set
for each record, create a new record set after every x records, or create a new record set when the value of a specific
field changes.
Sort on condition field: Select this if the condition you set is to create a new record set when the value of a specific
field changes, and you want to sort the records before applying that condition.
©2010 Objectif Lune Inc - 94 -