Focal Point
[CLOSED] Link Image to a dynamic URL

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

January 04, 2017, 04:52 AM
Prajakta
[CLOSED] Link Image to a dynamic URL
I am working on a report which is is in various output formats. I have one column in this report which has an image and this image is static one. However, I have to open a dynamic URL(a column in the table) after the user clicks on this image and open it accordingly.
This works perfectly fine for HTML output but does not work for PDF output.
Any help would be really appreciated

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


Webfocus 8.1.0.5
Windows, all output
January 04, 2017, 08:43 AM
Neelima
please try this

TABLE FILE GGSALES
SUM
UNITS
BUDUNITS

BY REGION BY CITY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=N1, URL='http://www.google.com', COLOR=RED, $
END


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
January 04, 2017, 11:47 PM
Prajakta
Thank you for your reply Neelima!
In the above code, the URL is static but my URL is coming from a column and is dynamic. The image of URL is static.
This works for me too.
Also the column which I am talking about has image URL in it and not text.

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


Webfocus 8.1.0.5
Windows, all output
January 04, 2017, 11:50 PM
Avinash
Use when condition in your code. That will be a conditional drilldown and styling.


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
January 05, 2017, 01:20 AM
Prajakta
Hello Avinash,

Can you please give me an example.

Thank you,
Prajakta


Webfocus 8.1.0.5
Windows, all output
January 05, 2017, 01:40 AM
Avinash
SET BYDISPLAY=ON

TABLE FILE CAR
SUM
SALES
COMPUTE CONDITION1/A10 =
IF COUNTRY EQ 'JAPAN' THEN '1'
ELSE IF MODEL EQ 'TR7' THEN '2'
ELSE '3'; NOPRINT

BY COUNTRY
BY MODEL

ON TABLE SET STYLE *
TYPE=DATA,COLUMN=N1, URL='http://www.google.com', WHEN=CONDITION1 EQ '1', $
TYPE=DATA,COLUMN=N1, URL='http://www.gmail.com', WHEN=CONDITION1 EQ '2', $
ENDSTYLE
END


Hoping this will work..


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
January 05, 2017, 02:00 AM
Neelima
Good Avi..


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
January 05, 2017, 07:19 AM
WF_IL
Hi

This is an example of a dynamic URL from a field, in this case a define field but it could be also a DB field which contains a URL. The drill is from the image column:

 

DEFINE FILE CAR
IMG1/A200='<img src="http://www.informationbuilders.com/sites/all/themes/zurb6/icons/ib_logo.svg" height="42" width="42"> ';
DYNLINK/A100=IF COUNTRY EQ 'JAPAN' THEN 'http://www.google.com' ELSE 'http://www.msn.com';
END
TABLE FILE CAR
SUM
MAX.IMG1
CAR.BODY.SALES


BY  CAR.ORIGIN.COUNTRY
BY  CAR.ORIGIN.DYNLINK NOPRINT

WHERE COUNTRY EQ 'JAPAN' OR 'ITALY'

ON TABLE NOTOTAL
ON TABLE SET STYLE *
 TYPE=DATA,
     COLUMN=P2,
      URL=(DYNLINK),
          TARGET='_blank',
$
ENDSTYLE
END


 



Yours,
Eran
SRL Products

http://www.srl.co.il

January 05, 2017, 10:53 AM
WF_IL
Hi

Regarding PDF, it is possible to show an image within a column, my image was saved in baseapp in the Server's APP PATH, however I didn't succeed to define the drill to work from the image however the drill down to a dynamic URL works correctly from a regular field:

 
DEFINE FILE CAR
DUMMY1/A100='';
DYNLINK/A100=IF COUNTRY EQ 'JAPAN' THEN 'http://www.google.com' ELSE 'http://www.msn.com';
END
TABLE FILE CAR
SUM

CAR.BODY.SALES

BY DUMMY1 AS 'image'
BY  CAR.ORIGIN.COUNTRY
BY  CAR.ORIGIN.DYNLINK NOPRINT

WHERE COUNTRY EQ 'JAPAN' OR 'ITALY'
ON TABLE PCHOLD FORMAT PDF
ON TABLE NOTOTAL
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=P1,IMAGE=pdf.jpg,$
TYPE=DATA,COLUMN=P2, URL=(DYNLINK),TARGET=_blank,$

ENDSTYLE
END



 



Yours,
Eran
SRL Products

http://www.srl.co.il

January 09, 2017, 12:12 AM
Prajakta
I also tried giving an URL for the image. If the image comes then the URL does not work. also if I give a URL to the image then the image does not appear instead the Image link and the URL appears on it. The URL does work perfectly fine but then the image does not appear at all


Webfocus 8.1.0.5
Windows, all output
January 30, 2017, 10:52 AM
Tamra
quote:
Prajakta

Prajakta,

Are you using WebFOCUS 769 ? I am just confirming since this is an old version. Please update your profile if you are using a different version. That will make it easier to help you out.

I am checking into this. Adding an image in a PDF is possible but adding a drilldown on the image does not seem to be available.

Searching in WebFOCUS 8105 the only way to accomplish this is to use a BLOB field in a data table such as MSSSQL or Oracle. This is supported in WebFOCUS 769 as well.


Thank your for participating in the Focal Point Forum,

Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5