Focal Point
[SOLVED]How to provide hyperlink for different data values in a report

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

May 30, 2016, 05:37 AM
info4pal
[SOLVED]How to provide hyperlink for different data values in a report
Hi,

I have the below car file code and I need to provide hyperlink on the bodytype and seats data whose values are different in each row.
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
SEATS
WHERE COUNTRY EQ 'ENGLAND'
END
-RUN
-EXIT

Say for the bodytype having the value as CONVERTIBLE,the hyperlink would be something like this =HYPERLINK("http://10.20.300.400/nx415/wb_device.php?page=reportname&amo=CONVERTIBLE","CONVERTIBLE")

For Sedan, the hyperlink value would be =HYPERLINK("http://10.20.300.400/nx415/wb_device.php?page=reportname&amo=SEDAN","SEDAN")

Also I need the hyperlink on the seats data in each row and
for example for the hyperlink on the seats for convertible bodytype having number of seats as 2 would be
=HYPERLINK("http://abcdef.corp.intranet:8880/check?ip=2&show_comm_string=1&seats=2")


for seats 4 for sedan, we would have the hyperlink as
=HYPERLINK("http://abcdef.corp.intranet:8880/check?ip=4&show_comm_string=1&seats=4")

If it was a static hyperlink,I would have given the value for the hyperlink but now since it is dynamic,Iam not sure how to pass it
differently for different data values.

Any suggestions or solution/s would be highly appreciated....

Thanks a lot in advance!

-IP

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
May 30, 2016, 08:15 AM
MartinY
This may suit your need
DEFINE FILE CAR
HBODY  /A200V = 'http://10.20.300.400/nx415/wb_device.php?page=reportname&' || 'amo=' || BODYTYPE;
HSEATS /A200V = 'http://abcdef.corp.intranet:8880/check?ip=' || LJUST(3, FPRINT(SEATS, 'I3', 'A3V'), 'A3V') || '&' || 'show_comm_string=1&' || 'seats=' || LJUST(3, FPRINT(SEATS, 'I3', 'A3V'), 'A3V');
END
TABLE FILE CAR
PRINT SEATS
      HBODY  NOPRINT
      HSEATS NOPRINT
BY COUNTRY
BY MODEL
BY BODYTYPE
ON TABLE NOTOTAL
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=BODYTYPE,
     URL=(HBODY),
$
TYPE=DATA,
     COLUMN=SEATS,
     URL=(HSEATS),
$
ENDSTYLE
END



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
May 30, 2016, 08:42 AM
info4pal
Hi ,

Martin- Thanks..

The hyperlink on the seats are working
but not on the bodytype....Can you please let me know what needs to be changed for the bodytype hyperlink to work....

Please let me know any suggeations...

Thanks a lot!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
May 30, 2016, 08:59 AM
Francis Mariani
The error is in the IP address 10.20.300.400 which is not valid:
quote:
A valid IP address must be in the form of xxx.xxx.xxx.xxx, where xxx is a number from 0-255.

Try changing 300 and 400 to numbers less than 256 to see the hyperlink work.


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
May 30, 2016, 09:02 AM
MartinY
I have just copied what you gave info4pal, the validity of the hyper link is your call.

Look at Francis highlight.


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
May 30, 2016, 04:47 PM
Waz
quote:
The hyperlink on the seats are working
but not on the bodytype....Can you please let me know what needs to be changed for the bodytype hyperlink to work....


You are not giving much information on the problem/error.

Also, I would strongly suggest that you check the documentation on drillouts.

Linking to a URL


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!

May 31, 2016, 02:52 AM
info4pal
Hi,

Thanks everyone.
It helped me a lot!!

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
May 31, 2016, 08:27 AM
George Patton
Actual useable values for xxx in Francis' example above are from 1 to 254. 0 and 255 are reserved.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
May 31, 2016, 09:36 AM
info4pal
Hi,

Yes George...For reference purpose,I had typed some sample value for the IP....
Thanks the hyperlink worked now.

Thanks a lot everyone.

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML