wsv01 Posted September 8, 2021 Share Posted September 8, 2021 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 8, 2021 Share Posted September 8, 2021 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? Quote Link to comment Share on other sites More sharing options...
wsv01 Posted September 8, 2021 Author Share Posted September 8, 2021 Sure, Attached are three images showing how I am trying to get this to work. Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted September 8, 2021 Share Posted September 8, 2021 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... Quote Link to comment Share on other sites More sharing options...
wsv01 Posted September 9, 2021 Author Share Posted September 9, 2021 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? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted September 9, 2021 Share Posted September 9, 2021 26 minutes ago, wsv01 said: 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? Hello, try code from this topics. or this: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.