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)
Hyperlink in (some cells) Crosstab report
fredbeneti
hi,<br />
<br />
I have this report:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
| month1 | month2 | month3 | month4 | month5 | month6 |
day1| T | F | F | T | T | T |
day2| F | F | F | F | T | F |
day3| T | T | T | T | T | F |
</pre>
I just wanna "create" hyperlink to some report, if cell is F or if cell is T. How can I do this? I'm using function onCreateCell( cellInst, reportContext ), but in this case, cellInst doesn't have the method get/setAction()<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function onCreateCell( cellInst, reportContext ){
if( cellInst.getCellType() == "aggregation"){
if( cellInst.getDataValue("data") == "F" ){
// what can I write here to create a link, just for data = F ?
}
}
}
</pre>
Find more posts tagged with
Comments
mwilliams
So, you want to provide one link when it's T and a different link when it's F? Is this correct?
fredbeneti
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72376" data-time="1295406095" data-date="18 January 2011 - 08:01 PM"><p>
So, you want to provide one link when it's T and a different link when it's F? Is this correct?<br /></p></blockquote>
<br />
Yes... but this is just a example. In fact, I just provide links for determinate value (according buses rules, for example: links for cell value < 1).<br />
<br />
thanks
mwilliams
I think there's an expression builder under the hyperlink URI that you could build your hyperlink depending on the cell value. If this doesn't work, you could probably use a text control to create your own hyperlinks using HTML href. You could build the links depending on the cell value using the dynamic text tag in a text box. Be sure to make the text box of type HTML. Let me know if you have questions.
fredbeneti
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72414" data-time="1295450701" data-date="19 January 2011 - 08:25 AM"><p>
I think there's an expression builder under the hyperlink URI that you could build your hyperlink depending on the cell value. If this doesn't work, you could probably use a text control to create your own hyperlinks using HTML href. You could build the links depending on the cell value using the dynamic text tag in a text box. Be sure to make the text box of type HTML. Let me know if you have questions.<br /></p></blockquote>
<br />
Yes, I know this expression builder. But this builder just "create" the different hyperlink. I think that I gave a wrong explain for the situation. I will try explain better... <br />
<br />
I need to provide link just for a group of values, if the value doesn't "belong" to the group I can't create the link. In the example of my first post: if is T I MUST create hyperlink, if is F I CAN'T create hyperlink.<br />
<br />
In this case, it's a crosstab and I tried all options in properties tab... Is there some solution? Can I create or not the hyperlink according the data cell?<br />
<br />
thanks
mwilliams
You should be able to do this with the textbox of type HTML. You can use the dynamic text tag within the standard text element to build your HTML output depending on the value of the cell. If it meets your criteria to need a hyperlink, you can build an <a href="www......">cellValeu</a> tag. If it doesn't, you can simply display the value with no HTML link built.
fredbeneti
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72418" data-time="1295451529" data-date="19 January 2011 - 08:38 AM"><p>
You should be able to do this with the textbox of type HTML. You can use the dynamic text tag within the standard text element to build your HTML output depending on the value of the cell. If it meets your criteria to need a hyperlink, you can build an <a href="www......">cellValeu</a> tag. If it doesn't, you can simply display the value with no HTML link built.<br /></p></blockquote>
<br />
NICE!
<br />
<br />
well, it works... but it isn't very intuitive, in my opinion.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<center><a href='#'>
<value-of>
if(data["ind"]==1)
data["value"]
</value-of>
</a></center>
<center>
<value-of>
if(data["ind"]==0)
data["value"]
</value-of></center>
</pre>
<br />
thanks!
mwilliams
No, it's probably not the most intuitive thing that could be done, but once you know it it isn't that difficult. That's what the forums are for!
Glad I could help. Let us know whenever you have BIRT related questions!
Shreelekha
Hi Michael
I have added hyperlink to column headers.When i click on that it will sort the column.
I am using birt 3.2, and I'm using drill-through
How to remove the underline from hyperlink, and how to change it's color?
Is there any way to do this?
If not,is there any way to do sorting without adding hyperlinks?
Please help me...
Thanks
Shrilekha
Shreelekha
Hi Michael..
Please reply me..
Thanks
Shrilekha
mwilliams
Take a look at this devShare post:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1311-removing-underline-from-hyperlink/
As for clicking on the value and changing the color, a user's link color usually changes by default if they've visited the link before. Are you wanting to change the link to a specific color? Let me know.
You'll have to rerun the report to do the change in sort, so a hyperlink is necessary. You could use an image as the clickable item and possibly change the image if it's the sorted column. You could also probably remove the hyperlink from the field that you're currently on so it can't be clicked again while sorted by that field already.