Troubleshooting: "invalid column name" from reports
Summary
When you execute a list view rule or summary view rule to produce a report, an “invalid column name” SQL error message appears. This message indicates that the problem is not a reporting issue, but arises from a class mapping misconfiguration. This article explains the reason for the error and how to avoid it.
Suggested Approach
New concrete classes (or class groups) must have Data-Admin-DB-Table instances defined that map them explicitly to the appropriate database tables
Without such explicit class-to-table mapping defined, data relies on fallback mappings that use the pr_other
, pr_history
, and pr_data
tables, and so forth. Because standard work and history reports are configured to use the intended pc_
tables rather than the fallback pr_
tables, your application classes must be mapped accordingly. Otherwise, database columns not present in the pr_
tables will be flagged as SQL errors when users attempt to execute standard reports.
For example, just as class Work-General maps to database table pc_work
, and class History-Work- maps to table pc_history_work
, so too does YourCo-WorkClass need to map to table pc_work
(or to another table you've created with similar exposed columns) and History-YourCo-WorkClass needs to map to table pc_history_work
.
When configuring your class-to-table mappings, keep in mind the following:
- When mapping classes to database tables, Process Commander uses the name pattern inheritance only, never directed inheritance.
- If a class is a member of a class group, the class-to-table mapping in Data-Admin-DB-Table must be defined on the class group rather than on the member class.
- In contrast to table mapping, rule resolution uses directed inheritance in addition to pattern inheritance, for classes that specify pattern inheritance.