Focal Point
[SOLVED]Hyperlink

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5627015176

July 02, 2014, 04:24 PM
phoenixfox
[SOLVED]Hyperlink
Hello. I'm requesting this again.

I have a code in Dev Studio with a defined paragraph field. I simply want to add a hyperlink in the paragraph. How can this be done? I have succeeded in creating a standalone hyperlink in a completely blank procedure but no luck within the defined paragraph.

Thanks, P

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


WebFOCUS 7.6
Windows, All Outputs
July 02, 2014, 05:34 PM
Waz
Can you post an example of your code so far ?

You should be able to, but it will involve manipulating the field.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 03, 2014, 02:55 AM
Ram Prasad E
Paragraph field you mean TEXT data type?

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
July 03, 2014, 08:14 AM
phoenixfox
The code is pretty lengthy. Here is one defined paragraph.
-**********CODE BEGINS**********************
PARAGRAPH5/A1000 = IF F8 EQ 'RE_2YR' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this is incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
ELSE
IF F8 EQ 'RE_DYDPT' THEN 'Do not enroll at UNC-Charlotte for 24 consecutive months. At that time you would be eligible for readmission using the Two Year Rule.'
ELSE
IF F8 EQ 'RE_DEGREE' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
ELSE
IF F8 EQ 'RE_SD' THEN '';
-*****CODE ENDS****************************

When the Excel output is generated, I would like "Residency Determination Office" to be a hyperlink.

Thank you, P


WebFOCUS 7.6
Windows, All Outputs
July 03, 2014, 08:32 AM
stur0063
It does work as a link in html if you just add an anchor tag:
 
<a href="http://www.cnn.com" target="_blank">Residency Determination Office</a>

- but it doens't become a real link in XLSX.

This isn't exactly what you want - but - it'd be easy to add another define column - and turn the whole colum into the link.

DALINK/A100='Residency Determination Office';

TYPE=DATA,
COLUMN=N5,
URL=http://www.cnn.com,
$

Could then tweak message to say "submit it to the Residency Determination Office (link next column)"


webFOCUS 8207.15
WindowsServer 2019
July 03, 2014, 11:44 AM
Tony A
Hi Phoenix,

I know two years in an education establishment can be a long time but you posted the exact same question (with the same code snippet!) in June 2012 (link). I recognised the text for the link!

Did one of those solutions not suit?

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 07, 2014, 09:22 AM
phoenixfox
You're absolutely right Tony. I couldn't figure it out with the solutions provided and so I tabled it until now. Responders say what I can do but now how to do it. SO I will try stur0063's suggestion and see if I can get it to work this time. Thank you.

P


WebFOCUS 7.6
Windows, All Outputs
July 07, 2014, 10:52 AM
phoenixfox
What is the syntax for linking the column? I have the new defined column working fine.

P


WebFOCUS 7.6
Windows, All Outputs
July 07, 2014, 11:06 AM
vaayu
When you say "linking the column" do you mean this? Also when you said you like the hyperlink for "Residency Determination Office". You could use a conditional hyperlink on the column using WHEN statement. Hope it helps.
  
TYPE=DATA,
COLUMN=PARAGRAPH5,
URL=http://www.cnn.com,
WHEN=N5 EQ  'Residency Determination Office',


hth..
July 07, 2014, 12:02 PM
phoenixfox
-****Define*****
HYPERLINK/A100= 'Residency Determination Office';
-*****************************

-***Paragraph5****************
PARAGRAPH5/A1000 = IF F8 EQ 'RE_DEGREE' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
ELSE
IF F8 EQ 'RE_SD' THEN '';
-****************************

-****Style*******************
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *

TYPE=DATA
COLUMN=HYPERLINK
URL=http://www.resdetermination.uncc.edu,
WHEN PARAGRAPH5='Residency Determination Office',
$
--***********************************

Am I close?

P


WebFOCUS 7.6
Windows, All Outputs
July 07, 2014, 12:28 PM
Tony A
Are you determined that the entire cell for PARAGRAPH5 is not to be the link and to have a separate cell for containing the link?

If so then I would suggest something like this -
DEFINE FILE yourfile
HYPERLINK/A30 MISSING ON = IF F8 IN ('RE_2YR','RE_DEGREE') THEN 'Residency Determination Office' ELSE MISSING;
PARAGRAPH5/A1000 = IF F8 EQ 'RE_2YR'    THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this is incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
              ELSE IF F8 EQ 'RE_DYDPT'  THEN 'Do not enroll at UNC-Charlotte for 24 consecutive months. At that time you would be eligible for readmission using the Two Year Rule.'
              ELSE IF F8 EQ 'RE_DEGREE' THEN 'Your residency for tuition purposes is ' | RES_STAT || '. If you feel this incorrect, you must fill out a residency application and submit it to the Residency Determination Office.'
              ELSE IF F8 EQ 'RE_SD'     THEN '';
END

TABLE FILE yourfile
[verb] PARAGRAPH5 AS ''
       HYPERLINK AS 'Links'
   BY field etc.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE * 
  TYPE=DATA, COLUMN=HYPERLINK, URL=http://www.resdetermination.uncc.edu, 
       WHEN=HYPERLINK EQ 'Residency Determination Office', $
ENDSTYLE
END
-RUN


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 07, 2014, 01:37 PM
phoenixfox
Well, the above by Tony gives me output. However, no hyperlink. I'm not opposed to trying the other method (entire paragraph link) I wasn't sure about the syntax.


WebFOCUS 7.6
Windows, All Outputs
July 07, 2014, 04:23 PM
phoenixfox
I also found out that even if I get the hyperlink in a separate defined column, when I mail merge it to a Word doc, the hyperlink is deactivated.

P


WebFOCUS 7.6
Windows, All Outputs
July 10, 2014, 02:53 PM
phoenixfox
Hello. Can anyone shed any light on why the hyperlink is not active when merging the Excel file into a Word document? I'm doing a mail merge and inserting the merged fields.

Thanks, P


WebFOCUS 7.6
Windows, All Outputs
July 11, 2014, 04:20 AM
Wep5622
I know nothing of merging Excel files into Word documents, I assume you're using some kind of external (to WF) product for that? It's quite possible that that product strips out your URL; you'll have to ask the vendor about that.

Is that URL a fully specified URL? E.g. http://your.company.com/etc/yo...t.somethingsomething instead of just /etc/your_link_target.somethingsomething?

If not and if your link target is a WebFOCUS procedure, did you SET FOCEXURL = 'http://your.company.com/' in your procedure?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
July 16, 2014, 09:49 AM
phoenixfox
Wep5622, I didn't SET FOCEXURL = ''

I'll play around with it and see if I can somehow keep the hyperlink when merging the Excel in the Word document.

Thanks, P


WebFOCUS 7.6
Windows, All Outputs