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.
Software/Hardware used:
ASKED:
October 11, 2006 1:35 PM
UPDATED:
December 24, 2009 10:37 PM
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.
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