Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to Hide drill-through hyperlink information?(Do not show Drill-through hyperlink information)
icon5.gif  How to Hide drill-through hyperlink information? [message #776763] Mon, 09 January 2012 08:34 Go to next message
Bruce Missing name is currently offline Bruce Missing nameFriend
Messages: 5
Registered: May 2011
Junior Member
hello, I wonder how should I do to hide drill-through hyperlink informaion in dril-through birt report?

description:
I view a drill-through Birt report with frameset servlet in IE. When mouse over the link, the hyperlink infromation will show on status label. Think about security, I want to hide these hyperlink information, how should I do?

with set html code onmouseover can hide the status info.
<a herf="" onmouseover="window.status='';return true" />


But how do I set onmouseover attribution on each hyperlink?
Is there some configuration to void show these hyperlink information?


image:
index.php/fa/6670/0/
  • Attachment: 钻取.png
    (Size: 16.44KB, Downloaded 1807 times)
Re: How to Hide drill-through hyperlink information? [message #776976 is a reply to message #776763] Mon, 09 January 2012 15:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this post:
http://www.birt-exchange.org/org/forum/index.php/topic/21921-question-setting-up-a-drill-through-hyperlink-to-not-show-url-toolbar-etc/page__s__4a015503bf55f3444a4f13805c8101c4

Jason

On 1/9/2012 3:34 AM, Bruce Mising name wrote:
> hello, I wonder how should I do to hide drill-through hyperlink informaion in dril-through birt report?
>
> description:
> I view a drill-through Birt report with frameset servlet in IE. When mouse over the link, the hyperlink infromation will show on status label. Think about security, I want to hide these hyperlink information, how should I do?
>
> with set html code onmouseover can hide the status info.
> <a herf="" onmouseover="window.status='';return true" />
>
> But how do I set onmouseover attribution on each hyperlink?
> Is there some configuration to void show these hyperlink information?
>
>
> image:
>
icon2.gif  Re: How to Hide drill-through hyperlink information? [message #777270 is a reply to message #776976] Tue, 10 January 2012 07:21 Go to previous messageGo to next message
Bruce Missing name is currently offline Bruce Missing nameFriend
Messages: 5
Registered: May 2011
Junior Member
Thanks for your reply reference.

I downloaded the example, with JS to set tag: <a> href value is fine, and the URL information is OK.
the example code:
index.php/fa/6688/0/

But there is one more question:
In my case, I used "Drill-through" and passed Cell's value to child report. The url hyperLink information is auto generated by render report.
It seems that I can't rewrite tag A's href value.

my drill-through report
index.php/fa/6689/0/

How should I do to hide the gernerated reports' hyperlink information?
to be more suitable show like "javascript: openwindow('some pass value')"

Regards,
Bruce
  • Attachment: drill-through.png
    (Size: 56.23KB, Downloaded 1881 times)
  • Attachment: href.png
    (Size: 16.49KB, Downloaded 1886 times)

[Updated on: Tue, 10 January 2012 07:40]

Report message to a moderator

Re: How to Hide drill-through hyperlink information? [message #777496 is a reply to message #777270] Tue, 10 January 2012 15:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can get a handle on all the <a> tags at run time using a script tag
in a text element, for example:

<script type="text/javascript">
//the function being added
function displaylayer() {
//alert("mouseover");
window.status='hello';
return true;
}

//this function adds the events
function changeLinks(){
var alinks = document.getElementsByTagName('A');
for (var i=0; i<alinks.length; i++) {
if (alinks[i].target == "_blank") {
//if IE
if(!window.event){
alinks[i].addEventListener('mouseover',displaylayer,false)
//otherwise
}else{
alinks[i].attachEvent('onmouseover',displaylayer)
}
}
}
}

changeLinks();
</script>

The issue with this is that most browsers have to be configured to allow
javascript to change the status bar.

Jason


On 1/10/2012 2:21 AM, Bruce Mising name wrote:
> Thanks for your reply reference.
>
> I downloaded the example, with JS to set tag:<a> href value is fine, and the URL information is OK.
> the example code:
>
>
> But there is one more question:
> In my case, I used "Drill-through" and passed Cell's value to child report. The url hyperLink information is auto generated by render report.
> It seems that I can't rewrite tag A's href value.
>
> my drill-through report's code pieces:
> <extended-item extensionName="CrosstabCell" id="167">
> <property name="content">
> <data name="ASSIGNEE" id="168">
> <property name="fontFamily">"宋体"</property>
> <property name="fontSize">12pt</property>
> <property name="fontWeight">bold</property>
> <property name="textAlign">center</property>
> <method name="onPrepare"><![CDATA[this.width = "150px";]]></method>
> <property name="resultSetColumn">ASSIGNEE</property>
> <list-property name="action">
> <structure>
> <property name="linkType">drill-through</property>
> <property name="toolTip">"test tool tips"</property>
> <property name="reportName">workDetail.rptdesign</property>
> <property name="targetWindow">_blank</property>
> <property name="targetFileType">report-design</property>
> <list-property name="paramBindings">
> <structure>
> <property name="paramName">processKey</property>
> <simple-property-list name="expression">
> <value type="javascript">params["processKey"].value</value>
> </simple-property-list>
> </structure>
> <structure>
> <property name="paramName">startTime</property>
> <simple-property-list name="expression">
> <value type="javascript">params["startTime"].value</value>
> </simple-property-list>
> </structure>
> <structure>
> <property name="paramName">endTime</property>
> <simple-property-list name="expression">
> <value type="javascript">params["endTime"].value</value>
> </simple-property-list>
> </structure>
> <structure>
> <property name="paramName">userName</property>
> <simple-property-list name="expression">
> <value type="javascript">data["ASSIGNEE"]</value>
> </simple-property-list>
> </structure>
> </list-property>
> </structure>
> </list-property>
> </data>
> </property>
> <property name="verticalAlign">middle</property>
> </extended-item>
>
> How should I do to hide the gernerated reports' hyperlink information?
> to be more suitable show like "javascript: openwindow('some pass value')"
>
> Regards,
> Bruce
Re: How to Hide drill-through hyperlink information? [message #778011 is a reply to message #777496] Wed, 11 January 2012 09:36 Go to previous messageGo to next message
Bruce Missing name is currently offline Bruce Missing nameFriend
Messages: 5
Registered: May 2011
Junior Member
Hi, Jason

Thanks for your suggestion.
I tested your given functions, by add this function into one JSP pages, when mouseover <a> tag the link info can be hide.
I tried put JS function into one text element, but it does not work so.
Maybe I misunderstand your advice Confused . and I submit my test example(see file attachments), Please take some time to see it.

My environment like follow:
version:BIRT 3.7
view servlet: frameset

One more question:
I wonder is there some way to generate hidden <a> tags. By override the report's render handlers to generate myself <a> tags.
For example: generate <a> tags like this could be void to display on status.
<a herf="" onmouseover="window.status='';return true" /> 


I think this could be the direct way. But I don't know which handler should be override?
In my example, I used a Data Cube, and passed the CrosstabCell value to child report.
can you tell me which handler should I extends and override?
an override handler example could be much more better Smile

Regards,
Bruce
icon7.gif  Re: How to Hide drill-through hyperlink information? [message #778287 is a reply to message #778011] Thu, 12 January 2012 07:39 Go to previous messageGo to next message
Bruce Missing name is currently offline Bruce Missing nameFriend
Messages: 5
Registered: May 2011
Junior Member
Hi, Jason

Thanks for your help. My problem has done, by used a text element with <JavaScript> function codes to set hide <a> tag, without use of drill-through.

Under is my tested JS codes in the text element.
<html>
<head>
<title>Simple Test</title>
<script language="javascript">
function openwindow(val)
{
	window.open("/nmcms/frameset?__report=customerDetail.rptdesign&__format=html&customName="+val,
		"myWindow",
		"menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,scrollbars=yes,status=no");
}

</SCRIPT>
</SCRIPT>
<P>
<A href="javascript: openwindow('<VALUE-OF>dimension["Group1"]["CUSTOMERNAME"]</VALUE-OF>')">
	<VALUE-OF>dimension["Group1"]["CUSTOMERNAME"]</VALUE-OF>
</A>


In my opinion, if the "drill-through" supply an option to set hyperlink show detail would be better Smile
Looking forward to your suggestion.

Regards,
Bruce
Re: How to Hide drill-through hyperlink information? [message #778403 is a reply to message #778011] Wed, 11 January 2012 18:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Bruce,

The actual hyperlinks are generated by a Java class. You could change
the html action handler class, but that would require changing your
distribution. If you look at your crosstab with the customer name you
could always delete your data item and use a text element like:

<a href="http://www.google.com" onmouseover="window.status='';return
true"><VALUE-OF>data["CUSTOMERNAME"]</VALUE-OF></a>

I tried this but the status still showed. If you have sensitive
variables you may want to use session variables instead of parameters.
For example you could store a session variable in one report like:
//on create
reportContext.getHttpServletRequest().getSession().setAttribute("tst",
this.getValue());

destination report

var mytst =
reportContext.getHttpServletRequest().getSession().getAttribute("tst");


Jason

On 1/11/2012 4:37 AM, Bruce Mising name wrote:
> Hi, Jason
>
> Thanks for your suggestion.
> I tested your given functions, by add this function into one JSP pages, when mouseover<a> tag the link info can be hide.
> I tried put JS function into one text element, but it does not work so.
> Maybe I misunderstand your advice :? . and I submit my test example(see file attachments), Please take some time to see it.
>
> My environment like follow:
> version:BIRT 3.7
> view servlet: frameset
>
> One more question:
> I wonder is there some way to generate hidden<a> tags. By override the report's render handlers to generate myself<a> tags.
> For example: generate<a> tags like this could be void to display on status.
> <a herf="" onmouseover="window.status='';return true" />
>
> I think this could be the direct way. But I don't know which handler should be override?
> In my example, I used a Data Cube, and passed the CrosstabCell value to child report.
> can you tell me which handler should I extends and override?
> an override handler example could be much more better :)
>
> Regards,
> Bruce
Re: How to Hide drill-through hyperlink information? [message #778408 is a reply to message #778287] Thu, 12 January 2012 15:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Bruce,

The solution you came up with is a good one. It would be good to log an
enhancement in bugzilla to hide the status or obfuscate the url in drill
throughs.

Jason

On 1/12/2012 2:39 AM, Bruce Mising name wrote:
> Hi, Jason
>
> Thanks for your help. My problem has done, by used a text element with
> <JavaScript> function codes to set hide <a> tag, without use of
> drill-through.
>
> Under is my tested JS codes in the text element.
> <html>
> <head>
> <title>Simple Test</title>
> <script language="javascript">
> function openwindow(val)
> {
> window.open("/nmcms/frameset?__report=customerDetail.rptdesign&__format=html&customName="+val,
>
> "myWindow",
> "menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,scrollbars=yes,status=no");
>
> }
>
> </SCRIPT>
> </SCRIPT>
> <P>
> <A href="javascript:
> openwindow('<VALUE-OF>dimension["Group1"]["CUSTOMERNAME"]</VALUE-OF>')">
> <VALUE-OF>dimension["Group1"]["CUSTOMERNAME"]</VALUE-OF>
> </A>
>
> In my opinion, if the "drill-through" supply an option to set hyperlink
> show detail would be better :) Looking forward to your suggestion.
>
> Regards,
> Bruce
Re: How to Hide drill-through hyperlink information? [message #778523 is a reply to message #778408] Fri, 13 January 2012 04:23 Go to previous message
Bruce Missing name is currently offline Bruce Missing nameFriend
Messages: 5
Registered: May 2011
Junior Member
hi, Jason,

Thanks for your help, I submitted the log in bugzilla.
The bug id :id=368504

Happy new year! best wishes!
Bruce,
Previous Topic:How to merge tow cells of the Grid row?
Next Topic:Parameter in sequence
Goto Forum:
  


Current Time: Fri Mar 29 15:38:36 GMT 2024

Powered by FUDForum. Page generated in 0.02670 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top