|
Hi Gary
I used RTVQMQRY and RTVQMFORM to pull the *QRYDFN into source. Then I created the *QMQRY and *QMFORM - I got a summay-only result.
This was on a V5R3 box, so it should work for anyone.
You need to have created and then include the *QMFORM when running the *QMQRY.
I tried a simple *QRYDFN over QIWS/QCUSTCDT with the following relevant items:
Selected files
ID File Library Member Record Format
T01 QCUSTCDT QIWS *FIRST CUSREC
Report column formatting and summary functions
Summary functions: 1-Total, 2-Average, 3-Minimum, 4-Maximum, 5-Count Overrides
Field Summary Column Dec Null Dec Numeric
Name Functions Spacing Column Headings Len Pos Cap Len Pos Editing
CDTLMT 1 2 Credit 4 0 4 0
Limit
BALDUE 1 2 Balance 6 2 6 2
Due
CDTDUE 1 2 Credit 6 2 6 2
Due
Selected output attributes
Output type . . . . . . . . . . . . . . Display
Form of output . . . . . . . . . . . . Summary only
The output from running this *QRYDFN was this:
Credit Balance Credit
Limit Due Due
FINAL TOTALS
TOTAL 44,097 5,896.75 135.50
The output from running the *QMQRY with the *QMFORM (STRQMQRY QMQRY(VHAMBERG1/TOTALSONLY) QMFORM(*QMQRY)) was this:
TOTAL TOTAL TOTAL
Credit Balance Credit
Limit Due Due
---------- ------------- -------------
44,097 5,896.75 135.50
The SELECT statement created by RTVQMQRY was this:
SELECT
ALL SUM(CDTLMT), SUM(BALDUE), SUM(CDTDUE)
FROM QIWS/QCUSTCDT
You would add substitution variables to a WHERE clause here.
HTH
Vern
On 2/27/2015 4:56 PM, Gary Thompson wrote:
Easy to do in a *QRYDFN but I'm not seeing how to set a *QMQRY to print only totals ?
We have a local command that converts *QRYDFN to *QMQRY which I used to create a
*QMQRY version that I can pass parameters to so users can create a totals only report,
but have yet found how to do that for the Query Manager report.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.