[Solved] Referencing table cells when using SUM OVER ACROSS
I have a table that has titles going horizontally on the first row and titles going vertically on the first column. The data cells are made up of counts that are links to another focexec. The problem is that I do not know how to reference the individual data cells. Can anyone give me some guidance? I can provide some code if that helps.
Thanks...This message has been edited. Last edited by: slim007,
If you are talking about referencing them in stylesheets, you could also try the FIELD=Px notation, where 'x' would be numerical number representing the order of Printed columns.
If you are not sure of the exact order, experiment with the following lines by changing the 'x' value to figure out how FOCUS is treating the cells in the background -
------------------------------------------------------------------------------------------------- Blue Cross & Blue Shield of MS WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!
July 30, 2008, 11:54 AM
slim007
BlueZone,
I'm running into another problem. I have links for each cell for my across columns and I have a "WHEN=fieldname GT 0". So, the links only show up when the count is greater than zero. However, for some reason the link still shows up for some of the zero counts. Do you have any solution?
Thanks...
7.1.4 UNIX Excel, PDF, HTML
July 30, 2008, 12:03 PM
Prarie
You may have the Columns referenced wrong. Try setting them to different colors so you can see which one is really which.
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
July 30, 2008, 01:05 PM
slim007
Using the Px notation, I get the row for that columns I have. Do you know how to reference a particular cell? I have a table with 7 columns and 17 rows.
Thanks...
7.1.4 UNIX Excel, PDF, HTML
July 30, 2008, 01:18 PM
Tony A
Slim,
For multiple columns the syntax is usually TYPE=what ever, COLUMN=column(*), etc. etc.
Not sure if you can use a numeric instead of the asterisk but you could try it out.
I can't test it at home.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
July 30, 2008, 01:46 PM
mgrackin
Is this something like what you are trying to do?
TABLE FILE CAR SUM RCOST OVER DCOST OVER SALES BY MODEL ACROSS BODYTYPE ON TABLE SET STYLE * TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR=GREEN, COLOR=WHITE, WHEN=SALES GT 0,$ ENDSTYLE END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
July 30, 2008, 02:24 PM
slim007
Mickey,
This is exactly what I am trying to do. However, for some reason even though the column value, in your example "Sales" is 0, the "WHEN" does not work. Could there be some other value that could be overriding the 0? I am at a loss...
Thanks...
7.1.4 UNIX Excel, PDF, HTML
July 30, 2008, 02:38 PM
FrankDutch
Slim
Can't you post some code? We might see what is wrong and an example of the report you need might help too. Create it in excel , make a screen print and show it.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
July 30, 2008, 03:06 PM
Prarie
I have had trouble Making across work like this before. This is how I made it work. Referencing CW in an Acrosscolumn would not work.
Please edit the original post you started this thread with and add [SOLVED] to the subject title.
FYI, you can also use the fieldname in the ACROSSCOLUMN= statement and it should work as well AS LONG AS the fieldname is not referecned more than once in the SUM statement.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
August 20, 2009, 10:48 AM
Prarie
What a great peice of information...I was driving my self crazy with an Across - and a red negative. I had SUM NEWCOST BY HIGHEST TOTAL NEWCOST ACROSS SMARTDATE
and it was not working...read this helpful hint below...redefined the second NEWCOST to a different name....and it works! Thanks Mickey
quote:
LONG AS the fieldname is not referecned more than once in the SUM statement.