Variable Report Heading in Query/400

pts.
Tags:
AS/400
Development
I use Query/400 to produce a report which has a "control number" in the report heading. This number is stored in a one-record file and also in a data area. The number is used for information only; it does not control data selection. Is there any way to access this information and put it in the report header? Thanks for any responses.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes,
If you select your “control number” file in your Query with the *ALL option as matching criteria, then your control number will be available on ALL records of your report. So you should be able to use it into your header.

======================================================================

I don’t know of a way to get a variable value into headings of a Query/400 query. However, if you convert it to a QM query, you can use the &col text variable syntax to place that column value in any heading line you create. The value could be obtained by joining to your one-record file or simply by passing it in as a parameter to the query and referencing the substitution variable in the SELECT that’s created. I think it needs to be referenced in the reporting in detail lines, but detail printing it can be suppressed simply by assigning a zero width.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following