Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     SOLVED: Define: across fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SOLVED: Define: across fields
 Login/Join
 
Platinum Member
posted
When I sum extdollars across by salesmonth, hold, then define against the hold file, the across extdollars for each salesmonth does not show up in the GUI as fields. Does anyone know why? I find this very strange. I can table the hold file and see everything. Thank you in Advance

This message has been edited. Last edited by: Kathy P,


Kathy Phillips
Web FOCUS 8.2.05.14, 8.1.05, 8.08, 8.0.7, 8.0.5,8.0.2m, 7.6.10,7.7.03
Windows
 
Posts: 118 | Location: Livonia, MI | Registered: March 27, 2009Report This Post
Master
posted Hide Post
I sort of hate to say this, but once you get involved with hold files ans subsequent defines it's MUCH easier to just hand-code everything.

I guess most of us old-timers think hand-coding is the only way to go anyway, although Information Builders seems hellbent on making us hang up our keyboards ....


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Master
posted Hide Post
I just noticed something else. ACROSS doesn't work with HOLD files. You need to use BY.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Master
posted Hide Post
Kathy,

This is by design ( I think ).

When you use ACROSS to make columns with the available data, there is no way of knowing how many columns will be available in the HOLD. That's probably why the GUI doesn't show the columns.

What WF does for you is create 'new' columns names.

See this example:
TABLE FILE CAR
	SUM 	SALES
	BY	COUNTRY
	ACROSS	SEATS
ON TABLE HOLD AS DEMO FORMAT FOCUS
END

?FF DEMO 


You'll see the hold contains 3 'sales' fields:
SAL2 ( for 2 seats )
SAL4 ( for 4 seats )
SAL5 ( for 5 seats )

The across-field-value is added to the name of the column as a suffix. But why SALES becomes SAL, I don't know.

( SET ASNAMES = ON/OFF changes this behaviour. )

You could also use the relative column names, that works all the time.

E01 being the first column
E02 being the second, etc.



Or use BY-fields in the HOLD and use ACROSS only in the actuall report like George Patton ( Is that your real name..., really ? ) suggests.


G'luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
ACROSS will work with hold files...after the hold do a ?ff to see what field names were generated (the E01...En) then re assign names in a defind for further use...this is very useful when trying to move values form a list down to columns across....


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 5 | Registered: February 12, 2013Report This Post
Expert
posted Hide Post
SET ASNAMES=ON is very important when creating a HOLD file with ACROSS. You may be able to turn this on using the GUI.

Meanwhile, I am not GUIfied, so I would be playing around with stuff like this...

TABLE FILE CAR
SUM
SALES
ACROSS COUNTRY
ON TABLE HOLD AS H001
END

Without SET ASNAMES=ON you get 5 fields names SALES (with aliases E01, E02, E03...).

With SET ASNAMES=ON you get 5 fields, named SALENGLAND, SALFRANCE, SALITALY, SALJAPAN and SALW GERMANY. To refer to the last field, because is has a space, you can use 'SALW GERMANY'.

To determine what the HOLD file field names are, you could run this:

CHECK FILE H001 HOLD
-RUN

TABLE FILE HOLD
PRINT FIELDNAME
-*ON TABLE HOLD AS H002
END


A complete program:
SET HOLDFORMAT=ALPHA
SET ASNAMES=ON
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM
SALES
ACROSS COUNTRY
ON TABLE HOLD AS H001
END
-RUN

CHECK FILE H001 HOLD
-RUN

TABLE FILE HOLD
PRINT 
COMPUTE FIELD_NAME/A80 = '''' || FIELDNAME || '''';
ON TABLE HOLD AS H002
END
-RUN

TABLE FILE H001
PRINT
-INCLUDE H002
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Hi, thank you everyone for your input. The client wants to support her reports in the GUI as much as possible. I know both ways. Some things I prefer the GUI, somethings I prefer to code. I concluded ACROSS is really for the final output stage. My client has an across field with many more columns to be computed and added and they do use some of the across fields. I ended up creating buckets for each of the across fields. Thanks


Kathy Phillips
Web FOCUS 8.2.05.14, 8.1.05, 8.08, 8.0.7, 8.0.5,8.0.2m, 7.6.10,7.7.03
Windows
 
Posts: 118 | Location: Livonia, MI | Registered: March 27, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     SOLVED: Define: across fields

Copyright © 1996-2020 Information Builders