Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
question - setting up a drill-through hyperlink to not show url, toolbar, etc
chavez_ant
I've got a web application that produces BIRT reports. The web application is set up so the main report recieves the following html settings, so the user cannot see the url and cannot see the toolbar and bookmark the report url:
"menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,scrollbars=yes,status=no"
If the user drills through for more information (drills to a 'new window') a subreport will come up. We'd like the drill through report to also work in the same manner as the main report. Can someone point me in the right direction on how to carry over these settings to the drill-through? Would I write a script on the hyperlink-ed object? If so, I haven't done much scripting, so any sample scripts would be appreciated.
Thanks in advance
-A.C.
Find more posts tagged with
Comments
mwilliams
Hi A.C.,
Are you creating your own URL when you do your hyperlink so that you can add the settings to your hyperlink URL?
chavez_ant
Thanks for the reply, been meaning to let you know my plan. The option to hide the url,etc has been delayed so I hadn't revisited this task until now. My plan would be to add a Text element to the report, set it for html format and write my customized drill-through using javascript. Let me know if there's a better way, but that seems like it would do the trick. I'll send another post if any follow up questions on this.
mwilliams
You can also build your custom drill through using the URI hyperlink feature of BIRT rather than using the "drill through" option.
chavez_ant
Hello, some advice on this issue that's occurring with my popup url. Below is a simplified example of the issue I'm having.
Lets say my datasource has the following values:
NUMBER
1
2
3
I have a table, with the a text element, html with the following code:
<html>
<head>
<title>Javascript popup test</title>
<script language="javascript">
function openwindow()
{
window.open("
http://myurl1.com/<VALUE-OF>row["NUMBER"]</VALUE-OF>","mywindow","menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,scrollbars=yes,status=no")
;
}
</SCRIPT>
<P>
<A href="javascript: openwindow()">Open the link for <VALUE-OF>row["NUMBER"]</VALUE-OF>
</A>
</body>
</html>
What appears in the report is a table with 3 hyperlinks:
Open the link for 1
Open the link for 2
Open the link for 3
All three hyperlinks, when clicking the link, are going to the url:
http://myurl1.com/3
When I'd expect the first link to go to
http://myurl1.com/1
, and the second to go to
http://myurl1.com/2
...
If I use a simple hyperlink like this, then it works properly.
<a href="
http://myurl1.com/<VALUE-OF>row["NUMBER"]</VALUE-OF>">Open
the link for <VALUE-OF>row["NUMBER"]</VALUE-OF></a>
I only have this issue when using javascript popup, because I want to hide the url, toolbar, etc.
Can I get a tip on a working method to do this? mwilliams, you mentioned using URI. If that will work better than this method, are there any examples of it in action, or docs with info on using that method?
Many Thanks,
A.C.
chavez_ant
I have duplicated my issue using birt 2.6.2 and the sample database. Please see attached rptdesign file. I set it up to simply do a google search on the selected item. You'll notice every link searches on the last item in the table.
Many thanks in advance to anyone that has any tips or can post a revision that works the way intended.
mwilliams
Try just doing a hyperlink on your data element in your table with URI type and just creating your URL with the expression builder. Each link would then definitely grab the current information and you'd just add any URL parameters you're wanting to use to your expression building the URL.
chavez_ant
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76843" data-time="1305064373" data-date="10 May 2011 - 02:52 PM"><p>
Try just doing a hyperlink on your data element in your table with URI type and just creating your URL with the expression builder. Each link would then definitely grab the current information and you'd just add any URL parameters you're wanting to use to your expression building the URL.<br /></p></blockquote>
<br />
Thanks for the tip. I did try that approach, and I can generate the url using this:<br />
<br />
"<a class='bbc_url' href='
http://www.google.com/search?q='>http://www.google.com/search?q="</a>
; + row["PRODUCTNAME"]<br />
<br />
However, I'm back to my original issue of the URL, toolbar, displaying.<br />
Do you have any tips on modifying the URI such that the options are enabled to hide the url, such as:<br />
"menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,scrollbars=yes,status=no"
mwilliams
Take a look at this modified version of your report.
Hope this helps.
chavez_ant
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76872" data-time="1305127367" data-date="11 May 2011 - 08:22 AM"><p>
Take a look at this modified version of your report.<br />
<br />
Hope this helps.<br /></p></blockquote>
<br />
That did help, I was able to apply your updates to the example, to my drill through like in the report. I've got my first prototype of a drill-through working with the javascript pop-op options working. Thanks again!!
mwilliams
Not a problem. Always glad to help! Let us know whenever you have questions!
chavez_ant
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76896" data-time="1305137858" data-date="11 May 2011 - 11:17 AM"><p>
Not a problem. Always glad to help! Let us know whenever you have questions!
<br /></p></blockquote>
<br />
Thanks! I already have another question, and it's part of this thread still.<br />
<br />
What I've found after some testing, with this method, is that the user can hover over the link and view the url, which is what we're trying to avoid. For example, in BIRT designer, run your version of teh issue_with_html_link report, run > 'view report as html' and then right-click a link and 'copy shortcut'. You'll see that the hover text users will get is something like this:<br />
<br />
javascript:openwindow2('<a class='bbc_url' href='
http://www.google.com/search?q=1974 Ducati 350 Mk3 Desmo'>http://www.google.com/search?q=1974 Ducati 350 Mk3 Desmo</a>')<br
/>
<br />
If you look at the hover text for the version of the report example I provided (the one that take you to the wrong search), the hover text does not display the url, it only displays: javascript: openwindow()<br />
<br />
Can I get some tips on how to get the link to not display the url when hovering over? Many thanks again, we're much closer now.
mwilliams
You might try specifying a "tooltip" value for your hyperlink. Maybe that will do it?
chavez_ant
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76904" data-time="1305153161" data-date="11 May 2011 - 03:32 PM"><p>
You might try specifying a "tooltip" value for your hyperlink. Maybe that will do it?<br /></p></blockquote>
<br />
Thanks again. I tried adding a tooltip by adding a 'title' tag to the hyperlink. The tooltip pops up, but when you run report in the webapp via firefox, the full link still displays in the status bar when you hover over the link. Let me know any more tips and I'll research other options as well.
mwilliams
Pass only the parameter through to the function then, this way, they only see the part they already know in the status bar. See the attached.
chavez_ant
I think I've got this working, where I want it to be now. With the attached revision, the user will only see what they selected. They'll see "javascript: openwindow('Product Name')" in the link, instead of the full url.
I thought I'd post it in case anyone else runs into this issue. If I have time, maybe I'll do a devshare with a full example of a drill-through report using this method. Thanks again!
mwilliams
I'll assume that your report looks exactly the same as the one I posted right above it that does the same thing!
The devShare entry would be great for others looking for a solution like this, if you do it!
chavez_ant
Looks like we both posted our similar fixes at almost the exact same time! Thanks.