Informix Error -4415: An ORDER BY or GROUP item specified within a report must be one of the report parameters.
Cause and resolution
An ORDER BY or GROUP item specified within a report must be one of the report parameters.
The names used in a ORDER BY, AFTER GROUP OF, or BEFORE GROUP OF statement must also appear in the parameter list of the REPORT statement. It is not possible to order or group based on a global variable or other expression. Check the spelling of the names in the statement and compare them to the REPORT statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4415 fires when an ORDER BY, AFTER GROUP OF, or BEFORE GROUP OF statement names
something other than a report parameter — per the official guidance, these names must appear
in the REPORT statement's own parameter list; it's not possible to order or group based on a
global variable or other expression.
- An
ORDER BY/AFTER GROUP OF/BEFORE GROUP OFname that isn't a report parameter, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the spelling of the names in the statement, per the official guidance.
- Compare them to the
REPORTstatement's parameter list, per the official guidance, and use a report parameter instead of a global variable or other expression.
Examples
Ordering by a global variable instead of a report parameter
REPORT myreport(rec)
ORDER BY global_sort_key
-- -4415: global_sort_key is not a parameter of myreport
Corrected
REPORT myreport(rec)
ORDER BY rec.order_id
Diagnostic Checks
- Check every
ORDER BY/AFTER GROUP OF/BEFORE GROUP OFname against theREPORTstatement's own parameter list.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4415 in this set yet.
An ORDER BY/GROUP name isn't a report parameter — use one of the report's own parameters
instead of a global variable or expression.