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.
My column references are not returning the values I expect when I have Here is example code:
TABLE FILE CAR
SUM SALES
ACROSS COUNTRY
COMPUTE
COL1/D10 = C1;
COL2/D10 = C2;
FOOTING BOTTOM
"Page <TABPAGENO of <TABLASTPAGE"
END
I expected C1 and C2 to reference the first and second columns, respectively. This is true when I don't include any "<" in my code. When I do have "<" in my code, C1 returns the value from the third column and C2 returns the value from the fourth column [or they return 0 when there are 2 or fewer columns in the report).
I can't figure out why the column references get shifted over by two columns. Any help would be much appreciated!This message has been edited. Last edited by: Jamie K.,
WebFOCUS 8.103 Windows 2008 Excel, PDF, HTML
Posts: 15 | Location: Vancouver, BC | Registered: November 20, 2013
Hi Jamie, Dave is right and I also think that in this case you have to count first from the ACROSS (which is kind of BY). So C1 = SALES sum of first COUNTRY, C2 = SALES sum of second COUNTRY and so on.
TABLE FILE CAR
SUM SALES
ACROSS COUNTRY
COMPUTE COL1/D10 = C1;
COL2/D10 = C2;
COL3/D10 = C3;
COL4/D10 = C4;
COL5/D10 = C5;
END
But as Dave mentioned, I don't see either any differences with or without
<
. Maybe we haven't understand what you mean. Post both your code with and without
<
.
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
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
The ACROSS measures (SALES specific to each COUNTRY value, in Martin's example) are not part of the internal matrix that is populated from the incoming data values. (That structure treats ACROSS as BY, hence it has but one column associated with SALES.)
When you make explicit reference to columns of the final report using Column notation, whether in a COMPUTE or in a "<" reference, the referenced column must be instantiated in the internal matrix; it gets added as a hidden verb object [much like real incoming columns referenced in COMPUTE and not appearing as an explicit verb-object).
That's apparently why the caret references affect the column-index assignment.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Here is a picture of my output. The first table doesn't have any carets in the code and the second one does. The column reference gets shifted over by the number of carets (2 in this case).
If I must include these two carets in my code, how will I reference the first two columns of the report? I was keeping my fingers crossed that indices of 0 and -1 would work but they don't.
I thought I had updated my profile to reflect the version of WF that I'm on but it still says 8.007. I'm using AppStudio 8.103. I wonder if my problem has to do with this version since I've never had any problems with column references in previous versions... and that might explain why you are seeing the same output with and without the caret.
WebFOCUS 8.103 Windows 2008 Excel, PDF, HTML
Posts: 15 | Location: Vancouver, BC | Registered: November 20, 2013
ah it gets wierder. If you use a BY field you get ENGLAND back, but then Column 2 is Japan, and Column 3 is W Germany. try it. oh this is very strange
DEFINE FILE ibisamp/CAR
DUMMY/A1 WITH CAR = ' ';
END
TABLE FILE ibisamp/CAR
SUM SALES
BY DUMMY
ACROSS COUNTRY
COMPUTE
COL1/D10 = C1;
COL2/D10 = C2;
COL3/D10 = C3;
COL4/D10 = C4;
COL5/D10 = C5;
ON TABLE SET HOLDLIST PRINTONLY
FOOTING
" <TABPAGENO of <TABLASTPAGE "
END
I just tried it in 768 and it works fine. so this is a bug, and a big nasty virus-carrying one. I think you should get an award, Vancouver, for discovering it!
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I found that if I first put my results in a hold table and then compute off the hold table, the column references are all correct, even when I have carets in the footing. I guess this is what I'll do until I find a cleaner solution.
Have a great weekend everyone!
WebFOCUS 8.103 Windows 2008 Excel, PDF, HTML
Posts: 15 | Location: Vancouver, BC | Registered: November 20, 2013