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.
I have a report that displays information by office. Some office have child offices that we have chosen to offset with 4 spaces and display in italics. The office column is a drill down column that dills to another report. Currently, because of the spaces the hyperlink for child offices is displaying with the leading spaces being part of the hyperlink. See sample below.
Is there a way to exclude leading spaces when showing the cell as a hyperlink (maybe including html in code)?
Thanks BThis message has been edited. Last edited by: bflemi3,
WebFOCUS 7.7 Windows All Output (Excel, HTML, PDF)
Posts: 31 | Location: Maryland, USA | Registered: April 30, 2010
Well, if your report is to be delivered in HTML only, you could add some kind of indicator to your output to determine if an indentation is to be displayed and use Javascript to manipulate the HTML output accordingly.
DEFINE FILE CAR
NEW_CAR/A50 = IF CAR EQ 'JAGUAR' OR 'JENSEN' OR 'MASERATI' THEN '@' || CAR ELSE CAR;
END
TABLE FILE CAR
SUM
RETAIL_COST AS 'Retail'
DEALER_COST AS 'Dealer'
BY COUNTRY AS 'Country'
BY NEW_CAR AS 'Car'
ON TABLE HOLD AS HRESULTS FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=NEW_CAR, FOCEXEC=DUMMY, $
END
-RUN
-HTMLFORM BEGIN
<html><head><title>My cars</title></head>
<body>!IBI.FIL.HRESULTS;</body>
<script type="text/Javascript">
window.onload = function() {
// Do your Javascript magic here to implement indentation when @ is found!
// blah
};
</script>
</html>
-HTMLFORM END
DEFINE FILE CAR
CAR_LINK/A200 = IF (CAR EQ 'JAGUAR' OR 'JENSEN' OR 'MASERATI')
THEN '<div>&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;<a href="/ibi_apps/WFServlet?IBIF_ex=myproc.fex">' || CAR || '</a></div>'
ELSE '<a href="/ibi_apps/WFServlet?IBIF_ex=myproc.fex">' || CAR || '</a>';
END
TABLE FILE CAR
SUM
RETAIL_COST AS 'Retail'
DEALER_COST AS 'Dealer'
BY COUNTRY AS 'Country'
BY CAR_LINK AS 'Car'
ON TABLE SET STYLE *
END
Of course, you'll be attempting to re-implement a feature that WF provides out-of-the-box but it is still an option.
Hope that helps.This message has been edited. Last edited by: njsden,
Thank you njsden for both replies. I really like your second post but how would I pass parameters to the downstream report if I'm creating the link in the define?
WebFOCUS 7.7 Windows All Output (Excel, HTML, PDF)
Posts: 31 | Location: Maryland, USA | Registered: April 30, 2010
bflemi3, just concatenate the value wherever you need it. For example, to run myproc.fex passing a value to &MYCAR, you could have something like this:
CAR_LINK/A200 = IF (CAR EQ 'JAGUAR' OR 'JENSEN' OR 'MASERATI')
THEN '<div>&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;<a href="/ibi_apps/WFServlet?IBIF_ex=myproc.fex&|MYCAR=' || CAR || '">' || CAR || '</a></div>'
ELSE '<a href="/ibi_apps/WFServlet?IBIF_ex=myproc.fex&|MYCAR=' || CAR || '">' || CAR || '</a>';
It is a bit cumbersome particularly if you'll be dealing with many parameters but that's the cost to pay when one chooses not to take advantage of the standard functionality that comes with the product.
You could use FOCEXEC along with Javascript code to manipulate the anchors after the output has been generated, but that may not necessarily be simpler. Sort of a trade off due to the special requirement you have.
You might be able to do all of the formatting in the StyleSheet:
TABLE FILE CAR
SUM
RETAIL_COST AS 'Retail'
DEALER_COST AS 'Dealer'
COMPUTE CHILD_FLAG/A1 = IF CAR EQ 'JENSEN' OR 'MASERATI' THEN 'Y' ELSE 'N'; NOPRINT
BY COUNTRY AS 'Country'
BY CAR AS 'Car'
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=CAR, FOCEXEC=DUMMY, JUSTIFY=LEFT, WHEN=CHILD_FLAG EQ 'N', $
TYPE=DATA, COLUMN=CAR, FOCEXEC=DUMMY, STYLE=ITALIC, JUSTIFY=RIGHT, WHEN=CHILD_FLAG EQ 'Y', $
ENDSTYLE
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
You could do this in a cascading style sheet, assuming this is only HTML.
-HTMLFORM BEGIN
<style>
.Indent {
padding-left: 20px;
}
</style>
-HTMLFORM END
DEFINE FILE CAR
CHILD/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N' ;
END
TABLE FILE CAR
PRINT CHILD NOPRINT
BY COUNTRY
ON TABLE SET HTMLCSS ON
ON TABLE SET CSSURL mycss.css
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY, FOCEXEC=drill, $
TYPE=DATA, COLUMN=COUNTRY, WHEN=CHILD EQ 'Y', CLASS=Indent, FOCEXEC=drill, $
ENDSTYLE
END
You may have to deal with each individually, although I wonder if you created the HTML report and sent it to Excel with SET HTMLFORMTYPE, whether it will still work.
As for PDF, here is an old programmers trick.
DEFINE FILE CAR
CHILD/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N' ;
CTY1/A4 = IF CHILD EQ 'Y' THEN ' ' ELSE EDIT(COUNTRY,'9999') ;
CTY2/A10 = IF CHILD EQ 'Y' THEN COUNTRY ELSE EDIT(COUNTRY,'$$$$999999') ;
END
TABLE FILE CAR
PRINT CHILD NOPRINT
BY COUNTRY NOPRINT
BY CTY1 AS 'COUN'
BY CTY2 AS 'TRY' IN +0
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=CTY2, FOCEXEC=drill, $
TYPE=DATA, COLUMN=CTY2, WHEN=CHILD EQ 'Y', FOCEXEC=drill, $
TYPE=DATA, COLUMN=CTY1, WHEN=CHILD EQ 'N', FOCEXEC=drill, $
ENDSTYLE
END