Focal Point
[SOLVED] Fieldname not recognized in SUBFOOT

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

August 14, 2014, 10:46 AM
J.Hines
[SOLVED] Fieldname not recognized in SUBFOOT
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,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

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,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
August 15, 2014, 03:28 AM
Alan B
To get no space between the field and the colon, use:
TABLE FILE CAR
SUM
	SALES
BY	COUNTRY
ON COUNTR SUBFOOT
"Total Amount for <COUNTRY|: <ST.SALES"
END 

Single concat, you were nearly there with the double concat!


Alan.
WF 7.705/8.007
August 15, 2014, 09:58 AM
George Patton
BY CUSTOMER_NAME NOPRINT
ON CUSTOMER_NAME SUBFOOT
"Total Amount for <CUSTOMER_NAME<+0>: <ST.QUANTITY" 


Spot markers still work ....


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP