I followed the pattern that I saw from several other posts to include a subfoot on a certain field since subtotals take up two rows.
Here is an example of what I've seen recommended:
BY CUSTOMER_NAME NOPRINT
ON CUSTOMER_NAME SUBFOOT
"Total Amount for <CUSTOMER_NAME: <ST.QUANTITY"
However, this gives me the following error:
FIELDNAME NOT RECOGNIZED: CUSTOMER_NAME
This code works fine (removing the name of the field I'm "subfooting" on:
BY CUSTOMER_NAME NOPRINT
ON CUSTOMER_NAME SUBFOOT
"Total Amount: <ST.QUANTITY"
If I take that field out of the subfoot, it works fine, but I've seen multiple posts with this type of code and nobody else complained said that it didn't work, so I'm not sure what I'm doing wrong. I've tried fully qualifying the fieldname with the table file name and segment, and that doesn't make a difference.
I'm not sure why it can recognize the field name for the BY statement and the ON statement, but not in the SUBFOOT statement, though it does correctly calculate the subtotal of QUANTITY.
ANSWER from Alan & diogopc: You can't have anything next to the field name or it will consider it part of the field. Here, the colon was messing up the interpreter.This message has been edited. Last edited by: J.Hines,
The life of a designer is a life of fight against the ugliness.
August 14, 2014, 11:02 AM
Alan B
BY CUSTOMER_NAME NOPRINT
ON CUSTOMER_NAME SUBFOOT
"Total Amount for <CUSTOMER_NAME: <ST.QUANTITY"
Could it be that the colon is getting in the way, try a space between the field name and the colon.
Alan. WF 7.705/8.007
August 14, 2014, 11:04 AM
diogopc
It's exactly what Alan said.
For example,
this works:
TABLE FILE CAR
SUM
SALES
BY COUNTRY
ON COUNTR SUBFOOT
"Total Amount for <COUNTRY : <ST.SALES"
END
this doesn't:
TABLE FILE CAR
SUM
SALES
BY COUNTRY
ON COUNTR SUBFOOT
"Total Amount for <COUNTRY: <ST.SALES"
END
WebFOCUS App Studio 8103 Windows7 All outputs
August 14, 2014, 11:09 AM
J.Hines
Jiminy Cricket and all his friends...
Thank you guys.
I wouldn't think a colon was valid in a field name, hence it should stop looking if it hits something that's not alphanumeric, underscore, or hyphen. There needs to be some way to set off a field completely. There should not be a space before a colon. I tried using the || concatenator, but that resulted in everything after the first set being cut off.
EDIT: I thought I had another issue in that it wasn't printing the name even though there was no error, but it was a data issue.This message has been edited. Last edited by: J.Hines,