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.
Anyone know of a good/standard way of getting both the BY field and ACROSS field column titles to line up?
Currently, when it outputs to EXL2K, the BY field titles are on row 2, and the ACROSS column titles are on row 1 with blank cells for row 2 underneath.
Any ideas? A special ON TABLE SET command I don't about yet?
Thanks in advance!This message has been edited. Last edited by: CoolGuy,
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
I tried the ACROSSTITLE SET command and it does nothing to help in my scenario. Neither does ACRSVRBTITL which does work in the way I want things to look if there is no BY fields present.
Example code that works when no BY field is present:
-*SET HIDENULLACRS=ON
-*SET ACROSSLINE=SKIP
-*SET ACROSSTITLE=SIDE
SET ACRSVRBTITL=OFF
TABLE FILE GGSALES
SUM DOLLARS AS Sales
ACROSS REGION
-*BY REGION
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END
Example code that adds the blank line underneath as soon as the BY field is added back in:
-*SET HIDENULLACRS=ON
-*SET ACROSSLINE=SKIP
-*SET ACROSSTITLE=SIDE
SET ACRSVRBTITL=OFF
TABLE FILE GGSALES
SUM DOLLARS AS Sales
ACROSS REGION
BY REGION
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END
I just want the ACROSS titles to stay on the same line as the BY titles. So, they would stay in the columns they are in still, just that blank line would not be created or present. The ACROSS titles would be where that blank line appears.
Any other ideas? *smh*This message has been edited. Last edited by: CoolGuy,
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
I'm afraid the blank line is here to stay. However, no despair, there is always a workaround with WF:
TABLE FILE GGSALES
BY REGION
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-SET &R=&LINES;
DEFINE FILE GGSALES
-REPEAT #D FOR &I FROM 1 TO &R;
-READ SAVE,®
®/D6S=IF REGION EQ '®' THEN DOLLARS ELSE 0;
-#D
END
-RUN
TABLE FILE GGSALES
SUM
-REPEAT #T FOR &I FROM 1 TO &R;
-READ SAVE,®
®
-#T
BY ST
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Thanks for chiming in. Did your code get borked upon submission? It looks kind of off in some places... Or am I just goofy? Not sure what you're doing here.
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
This is throwing a sledgehammer to a plush panda. It uses jQuery to copy the html within one cell into another, and then delete a row.
-*SET HIDENULLACRS=ON
-*SET ACROSSLINE=SKIP
-*SET ACROSSTITLE=SIDE
-*SET ACRSVRBTITL=OFF
TABLE FILE GGSALES
SUM DOLLARS AS SALES
ACROSS REGION AS ''
BY REGION
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
ON TABLE HOLD AS HREPORT1 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!--<script src="/approot/web/jquery-latest-min.js"></script>-->
<script type="text/javascript">
$(document).ready(function()
{
$( "body table:eq(0) tr:first td:first" ).css( { backgroundColor: "blue" } ); // for testing
$( "body table:eq(0) tr:nth(1) td:nth(0)" ).css( { backgroundColor: "pink" } ); // for testing
$( "body table:eq(0) tr:nth(1) td:nth(1)" ).css( { backgroundColor: "red" } ); // for testing
$( "body table:eq(0) tr:nth(2) td:nth(0)" ).css( { backgroundColor: "fuchsia" } ); // for testing
$( "body table:eq(0) tr:nth(1) td:nth(0)" ).html( $( "body table:eq(0) tr:nth(2) td:nth(0)" ).html() ); // Copy the Hire Date column title to the appropriate table cell
$( "body table:eq(0) tr:nth(2)" ).remove();
});
</script>
</head>
<body>
!IBI.FIL.HREPORT1;
</body>
</html>
-HTMLFORM END
The first four JavaScript lines highlight relevant table cells. The fifth line copies the text from the first table cell of table row three to table row two. The sixth line deletes table row three.
If you have rows before the relevant rows, adjust the nth values appropriately.
And, of course, this sledgehammer only works for HTML reports.This message has been edited. Last edited by: Francis Mariani,
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
You rock! Thanks for this! Will try and get it working here shortly. Does this technique work with Excel output also though? I can't seem to get it working this way in Excel after the fact. Update: Just saw your post update about only in HTML. Thanks... Hmm.... Now to get it working in Excel too...
Appreciate your time and effort in helping me with this!
Love your sayings too! lol A sledge hammer to a plush panda eh? Paints the picture!This message has been edited. Last edited by: CoolGuy,
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
CoolGuy, Well I used a variable & REG (without the space) and that produced the funny character. So here:
TABLE FILE GGSALES
BY REGION
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-SET &R=&LINES;
DEFINE FILE GGSALES
-REPEAT #D FOR &I FROM 1 TO &R;
-READ SAVE,&PLACE
&PLACE/D6S=IF REGION EQ '&PLACE' THEN DOLLARS ELSE 0;
-#D
END
-RUN
TABLE FILE GGSALES
SUM
-REPEAT #T FOR &I FROM 1 TO &R;
-READ SAVE,&PLACE
&PLACE
-#T
BY ST
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END
What this does is replace the ACROSS with a DEFINE. In this way you are not a tributary to Javascript or Jquery. Good luck!
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
There is also the trick using the Sequence style that Dan Satchell showed here
Course for it to work how you want it need to move the ACROSS after the BY fields like this:
TABLE FILE GGSALES
SUM DOLLARS AS Sales
BY REGION NOPRINT
ACROSS REGION AS ''
COMPUTE XREGION/A15 = REGION; AS 'REGION'
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=REPORT, COLUMN=XREGION, SEQUENCE=1, $
ENDSTYLE
END
This message has been edited. Last edited by: Crymsyn,
I chugged through things and got Danny's example logic working with our existing report that needed the formatting change. So, thank you Danny! Works with Excel output as well. Thanks everyone else also for chiming in and for the great other options that are out there!
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015