CHAPTER 13 CREATING REPORTS USING REPORT BUILDER 1.0, 2.0, AND 3.0
Figure 13-10. Data source view with one object
The next step in the process is to add a logical primary key to the Patient Census named query
because the report modeler requires a primary key when it generates the model. Because the query is
driven from the Admissions table, which contains the PatProgramID field that you know will contain
unique values, you can use this field as the logical primary key for the Patient Census query. The
PatProgramID field, in the example database, controls the admission and discharge records for a patient
over time. It is typical that the same patient will be admitted to two separate service lines, referred to as
programs; hence, you have PatProgramID. Without the PatProgramID field, the records would not be
unique with the patient’s identification number, PatID, alone.