Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Setting Hyperlink with Dynamic Parameter in Fex in 82

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Setting Hyperlink with Dynamic Parameter in Fex in 82
 Login/Join
 
Platinum Member
posted
FocalPoint 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.

 TYPE=type, [subtype], URL=url[(parameters...)],
WHEN=expression,[TARGET=frame,] $


Clearly, I'm missing something about making the parameters work. Thoughts?

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Virtuoso
posted Hide Post
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, 2015Report This Post
Platinum Member
posted Hide Post
Thank you both for the replies.

I ended up using the second option. It works beautifully!

Thanks again.

This message has been edited. Last edited by: JulieA,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Master
posted Hide Post
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, 2015Report This Post
Platinum Member
posted Hide Post
FocalPoint Community,

I've opened this discussion again.

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.

Is that the best approach?


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Member
posted Hide Post
Hi,

Try this.

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, 2013Report This Post
Platinum Member
posted Hide Post
Thank you, NARSA, for the reply.

I'm curious as to how this will work in a reporting object dependent on a user selection.

My users can select either HTML or Excel from a dropdown list in a filter panel tied to a reporting object.

Do you agree I need to use the Dialog Manager to direct the report output?


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Virtuoso
posted Hide Post
@JulieA

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, 2013Report This Post
Platinum Member
posted Hide Post
MartinY,

Thank you for your reply.

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:

 https://www.toyota.com/resources/Camry.pdf 


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,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Member
posted Hide Post
quote:
Originally posted by JulieA:
MartinY,

Thank you for your reply.

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:

 https://www.toyota.com/resources/Camry.pdf 


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, 2013Report This Post
Platinum Member
posted Hide Post
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,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Member
posted Hide Post
quote:
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, 2013Report This Post
Platinum Member
posted Hide Post
NARSA,

Thank you for the reply.

Let me try it out and see what happens.

-Julie


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Member
posted Hide Post
quote:
Originally posted by JulieA:
NARSA,

Thank you for the reply.

Let me try it out and see what happens.

-Julie


ok.


WebFOCUS 7x & 8x

 
Posts: 13 | Location: Toronto, ON, CA. | Registered: June 27, 2013Report This Post
Platinum Member
posted Hide Post
NARSA,

Again, thank you.

My metadata already includes each and every one of the more than 80 URLs. So, I was able to use this line:

 TYPE=DATA,COLUMN=N2,URL=(URL1), TARGET='_blank', $ 


and adapt it for my needs. It works beautifully. Thank you so much!


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Setting Hyperlink with Dynamic Parameter in Fex in 82

Copyright © 1996-2020 Information Builders