Focal Point
on subtotal: subtotal of noprint field and embed of another field in literal

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7071077331

April 14, 2004, 07:19 PM
<Vipul>
on subtotal: subtotal of noprint field and embed of another field in literal
I need help in doing the following:

TABLE FILE PD_INFO
PRINT CNT NOPRINT
AMOUNT/P17.2CM AS ''
TRIMMEMO AS ''
WHERE DEBITCREDIT EQ 'C'
BY TRNCODE NOPRINT SKIP-LINE
BY DESCRIPTION NOPRINT
BY HIGHEST AMOUNT NOPRINT
ON TRNCODE NOPRINT SUBHEAD
""ON TRNCODE SUB-TOTAL AMOUNT AS 'Subtotal:


Basically I want the output of Subtotal to print as:
Subtotal: 6 ACH Credit(s)
$4,552.00

If you notice I want the subcount of cnt(which has the value of 1) and description to print in subtotal command.

Any help will be appreciated.

Vipul
April 14, 2004, 07:24 PM
<Vipul>
My earlier postiing got truncated: it is

TABLE FILE PD_INFO
PRINT CNT NOPRINT
AMOUNT/P17.2CM AS ''
TRIMMEMO AS ''
WHERE DEBITCREDIT EQ 'C'
BY TRNCODE NOPRINT SKIP-LINE
BY DESCRIPTION NOPRINT
BY HIGHEST AMOUNT NOPRINT
ON TRNCODE NOPRINT SUBHEAD
""ON TRNCODE SUB-TOTAL CNT AMOUNT AS 'Subtotal:

Basically I want the field description and count of cnt to print on Subtotal before the subtotal is printed.

I want my output to be as:
Subtotal: 6 ACH Credit(s)
$1000.00

Any help will be appreciated.

Vipul
April 14, 2004, 07:30 PM
<Vipul>
My earlier postiing got truncated: it is

TABLE FILE PD_INFO
PRINT CNT NOPRINT
AMOUNT/P17.2CM AS ''
TRIMMEMO AS ''
WHERE DEBITCREDIT EQ 'C'
BY TRNCODE NOPRINT SKIP-LINE
BY DESCRIPTION NOPRINT
BY HIGHEST AMOUNT NOPRINT
ON TRNCODE SUB-TOTAL CNT AMOUNT AS 'Subtotal:
Basically I want the field description and count of cnt to print on Subtotal before the subtotal is printed.

I want my output to be as:
Subtotal: 6 ACH Credits
$1000.00

Any help will be appreciated.

Vipul
April 14, 2004, 09:16 PM
mgrackin
You will need to remove the SUBTOTAL and then add

ON TRNCODE SUBFOOT
"Subtotal: "
SUBTOTAL lines will always appear before SUBFOOTs so you will need to manually code both of them in a SUBFOOT.
April 14, 2004, 09:18 PM
mgrackin
Let's try that again:


You will need to remove the SUBTOTAL and then add

ON TRNCODE SUBFOOT
"Subtotal: <CNT.CNT <DESCRIPTION </1"
"<ST.AMOUNT"

SUBTOTAL lines will always appear before SUBFOOTs so you will need to manually code both of them in a SUBFOOT.
April 14, 2004, 11:15 PM
<Vipul>
Thanks Mickey,

It worked....
April 14, 2004, 11:31 PM
<Vipul>
Mickey,

How will I get the formatting in
Thanks
April 14, 2004, 11:33 PM
<Vipul>
Did not previewed. Somehow it does not like gt , lt symbols.

Ok How will I get the formatting in st.amount field it is a dollar field.

Thanks in advence

Vipul
April 15, 2004, 05:34 PM
mgrackin
Create a COMPUTE field (with the new format) equal to the AMOUNT field. Then change the SUBFOOT to do an ST. on the COMPUTE field. I do not know if there is a more elegant way to do this but it works. The following is an example using the CAR file.

TABLE FILE CAR
PRINT RCOST/D12M DCOST
COMPUTE NEWRCOST/D12M=RCOST; NOPRINT
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"<ST.NEWRCOST"
END