Troubleshooting: Report wizard error "Can't use property pzInsKey" when mapped to external data source
Summary
You create a report using an external database table (not the default pr_other) as the data source. In the last step of the Report wizard, you see the error message –
**Can't use property "pzInsKey" in this report. It's not a column.
This error displays for —
- Report wizards that generate both List View and Summary View reports
- All classes that you select in the Data Source step of the wizard
Explanation
The Report wizard returns the error message because the class of the report that is mapped to the external database table is an Integration data class, and the external table does not have the pzInsKey column. The Report wizard depends upon the existence of the pzInsKey column.
When a mapped database table does not contain the pzInsKey column, the last step of the Report wizard displays the Key of a Row field in which you can keep the default value pzInsKey or specify a different primary key. The Key of a Row field is not displayed when the mapped database table contains the pzInsKey column because pzInsKey is the default primary key.
Suggested Approach
In the last step of the Report wizard, Step 5, specify an existing property value for the Key of a Row field.
Select a key property from the data table class or its parent that maps to a column with the same selected property name in the external database table.
That is, change the value in the Key of a Row field from pzInsKey to the actual primary key column in the external database table.
After making this change, the Report wizard works without error.