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 need to create hyperlinks to external website based on a dynamic parameter. The user selects a store, and everything (including the URL) populates the fex.
Here is my code:
TABLE FILE STOREDIR
PRINT
STOREDIR.STOREDIR.STORE_ID NOPRINT
ON TABLE SUBHEAD
"<STOREDIR.STOREDIR.STORE"
"<STOREDIR.STOREDIR.ADDRESS"
"<STOREDIR.STOREDIR.CITY <STOREDIR.STOREDIR.STATE <STOREDIR.STOREDIR.ZIP"
"<STOREDIR.STOREDIR.PHONE"
"<STOREDIR.STOREDIR.URL"
" "
WHERE STOREDIR.STOREDIR.STORE_TYPE EQ '&STORE_TYPE.(<Convenience>).Type:.';
WHERE STOREDIR.STOREDIR.STORE EQ '&STORE.(FIND STOREDIR.STOREDIR.STORE IN STOREDIR).STORE:.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=REPORT, JUSTIFY=LEFT,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=FIELD,
JUSTIFY=LEFT,
STYLE=BOLD,
SIZE=12,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=2,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
LINE=3
OBJECT=FIELD,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=4,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=5,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=REPORT,
COLUMN=N2,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
FONT='CALIBRI',
SIZE=11,
$
TYPE=TABHEADING,
LINE=5,
OBJECT=FIELD,
ITEM=1,
URL="<STOREDIR.STOREDIR.URL",
$
ENDSTYLE
END
-RUN
-EXIT
I have reviewed pages 769-771 and 797-808 of Creating Reports With WebFOCUS Language Release 8.2 Version 04, and I'm close. I'm clearly missing something though about how to get the link working because I keep receiving "WebFOCUS Error No query information to decode."
I'm struggling with the syntax of the URL and parameter together.
If the field called URL already has the link to the url you want, just make it a link instead of a drill down. Here's an example:
DEFINE FILE CAR
URL1/A50= IF COUNTRY EQ 'ENGLAND' THEN 'http://www.jaguarusa.com'
ELSE IF COUNTRY EQ 'JAPAN' THEN 'http://www.toyota.com'
ELSE 'http://www.ford.com';
URL2/A255= '<a href='||''''|| URL1 | '''' | '>' || CAR.MODEL ||'</a>';
END
TABLE FILE CAR
PRINT
URL2 AS 'URL'
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
END
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
To build on what BabakNYC said, you can put html tags in your report and it will render the html. You need to make sure that you have SET HTMLENCODE = OFF.
Below is an example of how to use it in your report.
SET HTMLENCODE = OFF
DEFINE FILE STOREDIR
ANCHOR/A100V='<a href="' || STOREDIR.STOREDIR.URL || '" target="_blank">' || STOREDIR.STOREDIR.URL || '</a>';
END
TABLE FILE STOREDIR
PRINT
STOREDIR.STOREDIR.STORE_ID NOPRINT
ANCHOR NOPRINT
ON TABLE SUBHEAD
"<STOREDIR.STOREDIR.STORE"
"<STOREDIR.STOREDIR.ADDRESS"
"<STOREDIR.STOREDIR.CITY <STOREDIR.STOREDIR.STATE <STOREDIR.STOREDIR.ZIP"
"<STOREDIR.STOREDIR.PHONE"
"<ANCHOR"
" "
WHERE STOREDIR.STOREDIR.STORE_TYPE EQ '&STORE_TYPE.(<Convenience>).Type:.';
WHERE STOREDIR.STOREDIR.STORE EQ '&STORE.(FIND STOREDIR.STOREDIR.STORE IN STOREDIR).STORE:.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=REPORT, JUSTIFY=LEFT,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=FIELD,
JUSTIFY=LEFT,
STYLE=BOLD,
SIZE=12,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=2,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
LINE=3
OBJECT=FIELD,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=4,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=TABHEADING,
OBJECT=FIELD,
LINE=5,
SIZE=11,
JUSTIFY=LEFT,
FONT=CALIBRI,
$
TYPE=REPORT,
COLUMN=N2,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
FONT='CALIBRI',
SIZE=11,
$
ENDSTYLE
END
-RUN
-EXIT
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015
The solution worked beautifully for me relative to HTML reports.
I've added a user selection for output type. Users can select Excel or HTML.
For the HTML type, the links work perfectly.
For Excel, the line ends up showing the all the HTML code and repeating the url address twice.
I'm thinking about using the dialogue manager to separate a report formatted as HTML and a report formatted as Excel. My report is contained within a reporting object.
DEFINE FILE CAR URL1/A50= IF COUNTRY EQ 'ENGLAND' THEN 'http://www.jaguarusa.com' ELSE IF COUNTRY EQ 'JAPAN' THEN 'http://www.toyota.com' ELSE 'http://www.ford.com'; END
TABLE FILE CAR PRINT URL1 NOPRINT BY COUNTRY BY MODEL ON TABLE PCHOLD FORMAT XLSX ON TABLE SET STYLE * TYPE=DATA,COLUMN=N2,URL=(URL1), $ ENDSTYLE END
WebFOCUS 7x & 8x
Posts: 13 | Location: Toronto, ON, CA. | Registered: June 27, 2013
NARSA option does work for either HTML or Excel format Except if you have specific case that is not answered with that solution there is no reason to split or control the code with DM
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
I understand what you said about NARSA's solution, but I'm not sure I'm asking my question correctly.
So, I'll try to explain things a little bit differently.
I used Hallway's solution in my reporting object.
It works great for HTML format.
Then, I was asked to create a dropdown list for users to select either HTML or Excel.
I created that dropdown list in a filter panel, and I introduced new behavior into my portal.
When a user selects Excel and downloads the report, the URL repeats itself and includes some of the html code in it. In other words, I get something like this:
Is a Dialog Manager approach the best option for this reporting object?
Or, is there a different approach? Should I create a fex that selects the appropriate report and tie a report fex to the control for the selected format?
I need an approach that is dynamic in nature as I have nearly a hundred hyperlinks, and the number is expected to grow in the future.
Thanks.This message has been edited. Last edited by: JulieA,
I understand what you said about NARSA's solution, but I'm not sure I'm asking my question correctly.
So, I'll try to explain things a little bit differently.
I used Hallway's solution in my reporting object.
It works great for HTML format.
Then, I was asked to create a dropdown list for users to select either HTML or Excel.
I created that dropdown list in a filter panel, and I introduced new behavior into my portal.
When a user selects Excel and downloads the report, the URL repeats itself and includes some of the html code in it. In other words, I get something like this:
Is a Dialog Manager approach the best option for this reporting object?
Or, is there a different approach? Should I create a fex that selects the appropriate report and tie a report fex to the control for the selected format?
I need an approach that is dynamic in nature as I have nearly a hundred hyperlinks, and the number is expected to grow in the future.
Thanks.
Hi JulieA,
How did you create the dropdown list.
"I created that dropdown list in a filter panel, and I introduced new behavior into my portal."
WebFOCUS 7x & 8x
Posts: 13 | Location: Toronto, ON, CA. | Registered: June 27, 2013
To create my reporting object and filter panel, I followed the steps outlined on pages 273-279 (Chapter 8: Enhancing Portals Using Interactive Features and Coding Techniques) of the Business Intelligence Portal Release 8.2 Version 04 manual.
Specifically, I followed pages 277-279 to create the filter panel.
And I see the problem with my post above, you're not seeing the actual behavior. Every time I try to show it, it turns to a hyperlink.
Basically, it shows something like this:
a href=url target=blank repeat of url
This message has been edited. Last edited by: JulieA,
Originally posted by JulieA: To create my reporting object and filter panel, I followed the steps outlined on pages 273-279 (Chapter 8: Enhancing Portals Using Interactive Features and Coding Techniques) of the Business Intelligence Portal Release 8.2 Version 04 manual.
Specifically, I followed pages 277-279 to create the filter panel.
And I see the problem with my post above, you're not seeing the actual behavior. Every time I try to show it, it turns to a hyperlink.
Basically, it shows something like this:
a href=url target=blank repeat of url
Ok.
href will not work in Excel & try to implement using below example.
-DEFAULT &WFFMT = 'HTML';
DEFINE FILE CAR URL1/A50= IF COUNTRY EQ 'ENGLAND' THEN 'http://www.jaguarusa.com' ELSE IF COUNTRY EQ 'JAPAN' THEN 'http://www.toyota.com' ELSE 'http://www.ford.com'; END
TABLE FILE CAR PRINT URL1 NOPRINT BY COUNTRY BY MODEL ON TABLE PCHOLD FORMAT &WFFMT ON TABLE SET STYLE * TYPE=DATA,COLUMN=N2,URL=(URL1), TARGET='_blank', $ ENDSTYLE END
WebFOCUS 7x & 8x
Posts: 13 | Location: Toronto, ON, CA. | Registered: June 27, 2013