Focal Point
[CLOSED] Keep ACROSS headers after holding

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

October 25, 2019, 08:58 AM
intsoccersuperstar
[CLOSED] Keep ACROSS headers after holding
Hello,

I have the following code:

TABLE FILE TABLE_ONE
SUM NUMBER_OF_RECORDSS AS 'Number'
MAXUnits_Impacted AS 'MaxUnits'
Units_Impacted AS 'Units_Impacted'

COMPUTE eep/D12.2% = (1-( MAXUnits_Impacted/ NUMBER_OF_RECORDSS )) * 100; AS 'TQR %'

BY LOWEST ANALYST_ONE AS 'Analyst'
ACROSS Year RECOMPUTE
ACROSS Sort NOPRINT
ACROSS Month AS 'Month'
WHERE ( Date GT '20180131' )AND ( Date IS NOT MISSING);
ON TABLE SUBHEAD
"TEST TEST TEST"
"Run Date: &TODAY"
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS ACCESS_TEMP FORMAT FOCUS
END

TABLE FILE ACCESS_TEMP
PRINT *
WHERE ANALYST EQ '&Input_Variable_Analyst'
ON TABLE SUBHEAD
"TEST TEST TEST"
"Run Date: &TODAY"
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT XLSX

I'm not sure why, but I cannot seem to have the

WHERE ANALYST EQ '&Input_Variable_Analyst'

line anywhere else in this code and get the results I want. After (way too much) research I think it has something to do with the fact that I'm connecting to access, and WEBFOCUS seems to only acknowledge that line exists when it's in the final TABLE FILE statement.

But anyway...

If I export after the first TABLE FILE statement ends, I have a nice year header line and a a nice month header. But these lines are gone when I export the second TABLE FILE to excel. Is there any way to get them to carry over to the second TABLE FILE command?

Thanks in advance!

This message has been edited. Last edited by: FP Mod Chuck,


intsoccersuperstar
WebFOCUS 8105m
Windows, Excel
October 28, 2019, 07:39 AM
MartinY
WHERE ANALYST EQ '&Input_Variable_Analyst' 

Is working only in the second TABLE FILE because ANALYST is only "assigned/defined/created" in the first TABLE FILE by using
BY LOWEST ANALYST_ONE AS 'Analyst'

The AS assigned the new field name "ANALYST" to the original field ANAYLST_ONE
Change you where clause by
WHERE ANALYST_ONE EQ '&Input_Variable_Analyst'

and it then should work and you won't need the second TABLE FILE to have the proper field labeling as you expect and already have your result as an Excel file


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 28, 2019, 11:42 AM
Doug
You may need .EVAL in there to make it WHERE ANALYST EQ '&Input_Variable_Analyst.EVAL'
October 29, 2019, 11:33 AM
David Briars
It sounds like you are using 'ANALYST' in an AS phrase and would like it available within the HOLD file, for later reporting.

Can you check the SETting of ASNAMES?

It almost sounds like you have it set to OFF, and would want to try SETting it to 'FOCUS' given that this is a HOLD file in FOCUS format.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster