Informix Error -4430: Values cannot be RETURNed from within reports.
Cause and resolution
Values cannot be RETURNed from within reports.
A report cannot include a RETURN statement because that would return control to the routine that invoked the report. Only NewEra returns this error.
-4430 Record parameters for a report cannot contain elements that are arrays.
You cannot pass a whole array as a parameter of a function. You can pass an individual element of the array by using a subscript. In this case, a record variable is specified as a parameter using asterisk notation, but one of the components of the record is an array.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4430 covers two related variants documented on the same live page, per the official guidance:
-
NewEra: a report can't include a
RETURNstatement, since that would return control to the routine that invoked the report. -
A distinct, more specific condition: a report's record parameter (specified via asterisk notation) has a component that's an array — whole arrays can't be passed as parameters, and this applies even when the array is nested inside a record parameter.
-
A
RETURNstatement inside a report's body, per the official guidance — the first named cause. -
A record parameter (via asterisk notation) whose components include an array, per the official guidance — the second named cause.
Solutions / Resolution
- Remove any
RETURNstatement from the report. - If a record parameter has an array component, pass that component by individual element instead, per the official guidance.
Examples
A RETURN inside a report
REPORT order_report(rec)
FORMAT
ON EVERY ROW
PRINT rec.order_id
RETURN
-- -4430: RETURN is not allowed inside a report
Corrected
REPORT order_report(rec)
FORMAT
ON EVERY ROW
PRINT rec.order_id
Diagnostic Checks
- Check the report's body for a
RETURNstatement, and remove it. - Check whether a record parameter (passed via
.*) has an array component, and pass that component by individual element instead.
Related Errors / Related Topics
- -4162 — "Values cannot be RETURNed from within reports." The same underlying
RETURNrestriction, documented separately for the general (non-NewEra-specific) case. - -4429 — "Report and function parameters cannot be arrays." The same underlying array-parameter restriction, applied here to a record parameter's array component.
A report's RETURN statement is not allowed, or a record parameter has an array component —
remove the RETURN, or pass the array component by individual element.