I'm reporting to PDF using XFRX. I need to create a hyperlink to an internet URL.
The method XFRX uses for this is via a string in the Comments field of a report expression, so for example if I add a report expression with value = "Click Here" and put this in the comments:
#UR A HREF="https://www.rte.ie" https://tinyurl.com/yfzyu2s9
Then the created PDF will have a clickable "Click Here" link to that site. However I need to take the URL from a table field, i.e. not a static string, but I can't get it to work. I've tried:
#UR A HREF=#+mytable.myfield #UR A HREF=mytable.myfield #UR A HREF=eval(mytable.myfield)
Has anyone ever done this ?
Have you tried macro expansion?
I literally just started using this XFRX feature, and asked Martina if it was possible to also pass a target attribute when exporting to PDF, but the answer to that was no, sadly. However, if you output to HTML instead of PDF there are more options and she did indicate she could add the target attribute as something supported in direct HTML output. BTW you can also use the FRX user data field instead of the comments.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Alan Bourke Sent: Tuesday, August 23, 2022 11:45 AM To: profoxtech@leafe.com Subject: Creating a hyperlink on a PDF via XFRX.
I'm reporting to PDF using XFRX. I need to create a hyperlink to an internet URL.
The method XFRX uses for this is via a string in the Comments field of a report expression, so for example if I add a report expression with value = "Click Here" and put this in the comments:
#UR A HREF="https://www.rte.iehttps://protect-us.mimecast.com/s/VFUxC9rpyDTVYvYs0htmW?domain=rte.ie" <https://tinyurl.com/yfzyu2s9https://protect-us.mimecast.com/s/A_5fC0R2m0I0rKrhrEoHW?domain=tinyurl.com>
Then the created PDF will have a clickable "Click Here" link to that site. However I need to take the URL from a table field, i.e. not a static string, but I can't get it to work. I've tried:
#UR A HREF=#+mytable.myfield #UR A HREF=mytable.myfield #UR A HREF=eval(mytable.myfield)
Has anyone ever done this ?
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
Hi Alan,
since the Comments field of a Report-object doesn't get preprocessed by XFRX, your various attempts cannot get you the expected results.
You could either modify the XFRX sourcecode (if you have bought the full package), or contact Martina via support@eqeus.com to add that functionality.
I also seem to remember, that you could rewrite the content of the reportfile fields on the fly with some trick, thus you could rewrite the content before it gets processed by XFRX.
wOOdy
-----Ursprüngliche Nachricht----- Von: ProFox profox-bounces@leafe.com Im Auftrag von Alan Bourke Gesendet: Dienstag, 23. August 2022 17:45 An: profoxtech@leafe.com Betreff: Creating a hyperlink on a PDF via XFRX.
I'm reporting to PDF using XFRX. I need to create a hyperlink to an internet URL.
The method XFRX uses for this is via a string in the Comments field of a report expression, so for example if I add a report expression with value = "Click Here" and put this in the comments:
#UR A HREF="https://www.rte.ie" https://tinyurl.com/yfzyu2s9
Then the created PDF will have a clickable "Click Here" link to that site. However I need to take the URL from a table field, i.e. not a static string, but I can't get it to work. I've tried:
#UR A HREF=#+mytable.myfield #UR A HREF=mytable.myfield #UR A HREF=eval(mytable.myfield)
Has anyone ever done this ?
Thanks.
I will look into those options. I also considered having a placeholder URL and then postprocessing the PDF file as hyperlinks seem to be plain text inside them.
Turns out it's a real pain in the ass to do this on a VFP report layout directly. So I knocked up a .NET COM-visible DLL which uses a third party library to place the relevant hyperlink onto an already-created PDF file.
Want to share? 😊
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Alan Bourke Sent: Friday, August 26, 2022 9:44 AM To: profoxtech@leafe.com Subject: Re: Creating a hyperlink on a PDF via XFRX.
Turns out it's a real pain in the ass to do this on a VFP report layout directly. So I knocked up a .NET COM-visible DLL which uses a third party library to place the relevant hyperlink onto an already-created PDF file.