Jump to content

View PDF with hyperlink opening new tab


wsv01

Recommended Posts

I have an issue with displaying a PDF generated with Digital Metaphors report writer. Report writer allows you to attach a simple URL link to a field on the report. It works if the URL is something like this https://www.google.com/. That is a wonderful thing, however, if I want to open the link in a new browser tab, I cannot figure out how to do it. I know there is the a feature that will force a new tab that looks something like this. <a href="https://www.freecodecamp.org/" target="_blank"></a>. That will not work when it is placed in the report writer URL property. There is another feature that report writer has called an OnDrawCommandClick property that can be leveraged to do almost anything, but when the PDF is presented using the PDF viewer control supplied by UniGUI it is not clickable as it is in a VCL application. Has anyone used report writer to generate a PDF and had this problem? I sure would like to know how to overcome this issue.

Link to comment
Share on other sites

3 minutes ago, wsv01 said:

I have an issue with displaying a PDF generated with Digital Metaphors report writer. Report writer allows you to attach a simple URL link to a field on the report. It works if the URL is something like this https://www.google.com/. That is a wonderful thing, however, if I want to open the link in a new browser tab, I cannot figure out how to do it. I know there is the a feature that will force a new tab that looks something like this. <a href="https://www.freecodecamp.org/" target="_blank"></a>. That will not work when it is placed in the report writer URL property. There is another feature that report writer has called an OnDrawCommandClick property that can be leveraged to do almost anything, but when the PDF is presented using the PDF viewer control supplied by UniGUI it is not clickable as it is in a VCL application. Has anyone used report writer to generate a PDF and had this problem? I sure would like to know how to overcome this issue.

Hello,

Can you please explain in more detail?

Link to comment
Share on other sites

this is a restriction of the report builder, the generated pdf creates a url that does not open the link and a new page.
if you open the pdf in any other editor the same thing will happen.

for this specific case, I suggest you generate a report in pure html, so you will have more control

you assemble the html, throw it into a tuniHTMLMemo

for print.

  UniSession.AddJs(edHtml.jsname+'.iframeEl.dom.contentWindow.print();');

 

I use the report builder a lot, and for some cases I had to do it that way...

Link to comment
Share on other sites

22 hours ago, wilton_rad said:

this is a restriction of the report builder, the generated pdf creates a url that does not open the link and a new page.
if you open the pdf in any other editor the same thing will happen.

for this specific case, I suggest you generate a report in pure html, so you will have more control

you assemble the html, throw it into a tuniHTMLMemo

for print.

  UniSession.AddJs(edHtml.jsname+'.iframeEl.dom.contentWindow.print();');

 

I use the report builder a lot, and for some cases I had to do it that way...

Let me ask this... If I click a button that opens a new form, can that form be opened in a new browser tab? If so, can someone please give me an example?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...