Variable page heading in query

200 pts.
Tags:
AS/400
RPG
I have created a query in which I am passing parameters. The query works great but I was wondering is there a way to make the page heading variable? For example, if the user needed a report on a particular vendor and this parameter was passed to my query, I would want the report heading to read 'Payments made to vendor XXXXXXX' with XXXXXXX being the vendor number.

Answer Wiki

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

The only way I have been able to do this is to use SQM/400 to create the final report. This allows you to use any data from the file in headings & footers.
I create a holding file to keep the parameter, e.g. User name, Company Name, date range, etc.
I join this file to my final created file, in SQM.
I then use the information in the header for the report.
Kas

Discuss This Question: 2  Replies

 
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
  • RichGr
    You can OVRPRTF QPQUPRFIL when you run the query and load the parm field PRTTXT with the parameters to id the query. This will print at the bottom of each page of the query. The field is short (I think 30 characters), but gives you the flexibility to label the report. HTH.
    0 pointsBadges:
    report
  • TomLiotta
    You haven't said what product you're using to create and run your query. If this is with Query/400, there is no good way to do it. If this is a QM query, you simply enter the column number as a variable in the heading text. The column number refers to the ordinal position of the column (&1, &2, etc.) in the underlying SELECT statement column list. Often, that column is only desired as part of the heading and not as part of any detail line. To remove it from detail lines, you set the width to zero for it in the detail line of the report form. The QM reference describes the steps for inserting variable values in headings in the 'Specifying page headings and footings in Query Manager' subtopic. An example is in the manual. Tom
    125,585 pointsBadges:
    report

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