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 Crosstab report
A@vi
Hello,
Currently i am using MyEclipse Blue 7.5 birt report. I want to give hyperlink in the crosstab column.
But not able to.
I want to give hyperlink on Student Name , so that it will link to other page.
Its happening but instead of name ,it is showing the link itself in the report.It is linking to the particular page which is correct. Only i need the name in the report.
This is the code :
<extended-item extensionName="DimensionView" id="198759">
<property name="dimension">Group1</property>
<property name="levels">
<extended-item extensionName="LevelView" name="NewLevel View1" id="198760">
<property name="level">Group1/SName</property>
<property name="member">
<extended-item extensionName="CrosstabCell" id="198761">
<property name="content">
<data name="SName" id="198762">
<property name="style">NewStyle2</property>
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10px</property>
<property name="textAlign">left</property>
<property name="resultSetColumn">SName</property>
<structure name="action">
<property name="linkType">hyperlink</property>
<expression name="uri">data["urlForReport"]</expression>
<property name="targetWindow">_blank</property>
</structure>
</data>
</property>
<property name="textAlign">left</property>
<property name="width">100px</property>
</extended-item>
</property>
</extended-item>
</property>
</extended-item>
In other report I put a hyperlink in a table . it is working fine.
<expression name="uri">row["urlForReport"]</expression>
But in Crosstab report its not working.
Can anyone help ??
Thanks
Find more posts tagged with
Comments
mwilliams
Can you recreate what you're doing with the sample database and attach the reports in here so I can see what you're doing? Thanks.
A@vi
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72071" data-time="1294700902" data-date="10 January 2011 - 04:08 PM"><p>
Can you recreate what you're doing with the sample database and attach the reports in here so I can see what you're doing? Thanks.<br /></p></blockquote>
<br />
<br />
Thanks for reply.......<br />
I had fixed this issue by doing some R&D. <br />
I created a dummy dataset. & added it to the crosstab group.I hide the dummy column.<br />
In fetch method i called the service.<br />
Now it is working.<br />
<br />
Thanks
A@vi
I have another problem in this report.
The Hyperlink which i am providing in the report, it shows the link with an underline in it.
But i don't want that underline to be visible.
Is there any option to remove that underline ?
Want Help.
Thanks...
mwilliams
I'll have to look into this. If the style of the hyperlink that BIRT creates isn't changeable, maybe creating your own hyperlink with an HTML tag in a text element will allow it. If I figure out a way to get rid of the underline, I will post back in here.
mwilliams
Looks like you'll have to create a hyperlink using a text control and set the text-decoration property to none. I haven't tried it, but that should work. Let me know.
A@vi
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72123" data-time="1294763708" data-date="11 January 2011 - 09:35 AM"><p>
Looks like you'll have to create a hyperlink using a text control and set the text-decoration property to none. I haven't tried it, but that should work. Let me know.<br /></p></blockquote>
<br />
Thanks for reply...<br />
I have tried with text-decoration as well as text-underline property ,by setting it to none.<br />
But no change is affecting to the link.
mwilliams
Hmmm... I will take a look closer at this option and let you know if I find anything further.
A@vi
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72130" data-time="1294767926" data-date="11 January 2011 - 10:45 AM"><p>
Hmmm... I will take a look closer at this option and let you know if I find anything further.<br /></p></blockquote>
<br />
Thanks for looking into the issue.<br />
Can we change the underline color ? Is there any such option ?<br />
Or it comes by default with birt report ?<br />
If we can change color then then we can change it to white color so that it will be invisible.<br />
<br />
Thanks<br />
Avinash
mwilliams
Avinash,
Try something like:
<a style="text-decoration: none;" href="
http://www.google.com">hyperlink</a>
;
A@vi
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72137" data-time="1294772731" data-date="11 January 2011 - 12:05 PM"><p>
Avinash,<br />
<br />
Try something like:<br />
<br />
<a style="text-decoration: none;" href="<a class='bbc_url' href='
http://www.google.com">hyperlink</a>'>http://www.google.com">hyperlink</a></a><br
/></p></blockquote>
<br />
<br />
But this we have to write in jsp page.<br />
I am not using any jsp page. Directly from MyEclipse 7.5 Birt i am giving the hyperlink.<br />
<br />
This is the cell , where i am giving the hyperlink :<br />
This is a normal table where i am giving hyperlink .<br />
<br />
<cell id="75"><br />
<property name="borderBottomColor">#000000</property><br />
<property name="borderBottomStyle">solid</property><br />
<property name="borderBottomWidth">1px</property><br />
<property name="borderLeftColor">#000000</property><br />
<property name="borderLeftStyle">solid</property><br />
<property name="borderLeftWidth">1px</property><br />
<property name="borderRightColor">#000000</property><br />
<property name="borderRightStyle">solid</property><br />
<property name="borderRightWidth">1px</property><br />
<property name="borderTopColor">#000000</property><br />
<property name="borderTopStyle">solid</property><br />
<property name="borderTopWidth">1px</property><br />
<data id="92"><br />
<property name="marginTop">0pt</property><br />
<property name="resultSetColumn">studentName</property><br />
<strong class='bbc'><structure name="action"><br />
<property name="linkType">hyperlink</property><br />
<expression name="uri">row["urlForReport"]</expression><br />
<property name="targetWindow">_blank</property><br />
</structure></strong><br />
</data><br />
</cell><br />
<br />
<br />
Thanks,<br />
Avinash
mwilliams
I think you're going to have to build the hyperlinks by yourself in text controls and do it the way I showed you. You'd just have to replace your data element in your post with a text element and set the type to HTML and use javascript to build the HTML link. I don't know that there's a way to change that formatting of a hyperlink in BIRT.
A@vi
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72187" data-time="1294846588" data-date="12 January 2011 - 08:36 AM"><p>
I think you're going to have to build the hyperlinks by yourself in text controls and do it the way I showed you. You'd just have to replace your data element in your post with a text element and set the type to HTML and use javascript to build the HTML link. I don't know that there's a way to change that formatting of a hyperlink in BIRT.<br /></p></blockquote>
<br />
Ok ... I will try with this one...<br />
<br />
Thanks
Shreelekha
Hi..
Is there any way to remove the underline?
and to change the column color when clicked on column?
I am using birt 3.2, I ahve added hyperlinks to the column,
Regards
Shreelekha
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.
Shreelekha
Hi mwilliams,
Thanks a lot for replying.. I have made the changes,it's working fine now..
I have few doubts hope you'll help me...
1.Does Birt (open source) support client side sorting? so it should not hit the DB again.
2.Is it possible to do sorting without drill-through?
Because when i click on column header(hyperlink) it's reloading the report.
3.Is there any way to do sorting without reloading the report?
I'll be waiting for your reply.. please help me mwilliams.
Thanks
Shreelekha
mwilliams
Actuate's interactive viewer supports resorting without hitting the database again. You can find a trial on the downloads page if you want to check it out. Open source BIRT does not do this out of the box. You'd have to create this functionality on your own. You could try to use the .rptdocument to do this. Or you could also try creating multiple tables sorted different ways and hide/show the appropriate table using client side script.
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117475" data-time="1370762725" data-date="09 June 2013 - 12:25 AM"><p>
Actuate's interactive viewer supports resorting without hitting the database again. You can find a trial on the downloads page if you want to check it out. Open source BIRT does not do this out of the box. You'd have to create this functionality on your own. You could try to use the .rptdocument to do this. Or you could also try creating multiple tables sorted different ways and hide/show the appropriate table using client side script.<br /></p></blockquote>
<br />
Hi Michael<br />
<br />
Thank you for your reply:). You suggested me to use .rptdocument for sorting.<br />
Plesae suggest me. I'm new to birt....<br />
1.How to use .rptdocument in birt hyperlink?<br />
2.What is .rptdocument?<br />
3.Does .rptdocument support client side sorting?<br />
<br />
Can you please send me a sample .rptdesign,which has used .rptdocument for column sorting<br />
and a client side java script to do this...<br />
Will be waiting for your reply... <br />
<br />
Thanks<br />
Shreelekha
mwilliams
I don't have an example doing this and don't have the time to create one right now. The .rptdocument is the document that is created by the run task when separate run and render tasks are used. It contains the data needed to render the report, so you could try to use this document to grab your data and re-render the report/table without re-running everything. Good luck!
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117496" data-time="1370880185" data-date="10 June 2013 - 09:03 AM"><p>
I don't have an example doing this and don't have the time to create one right now. The .rptdocument is the document that is created by the run task when separate run and render tasks are used. It contains the data needed to render the report, so you could try to use this document to grab your data and re-render the report/table without re-running everything. Good luck!<br /></p></blockquote>
<br />
Hi Michael<br />
<br />
Thank you for your quick reply..<br />
How can i remove the hyperlink added to the column header for sorting.When i print the report in html format.<br />
I'm able to do this if report is exported as PDF.<br />
I'm using <br />
if (reportContext.getOutputFormat()!="html") <br />
this.action = null; in OnRender.<br />
I am not able to remove hyperlink if report exported as Excel.. <br />
Could you please help me...<br />
<br />
Thanks<br />
Shreelekha
mwilliams
This works for me when exporting to XLS from the viewer:<br />
<br />
onRender of label element with hyperlink<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(reportContext.getOutputFormat() != "html"){
this.action = null;
}
</pre>
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117614" data-time="1371059872" data-date="12 June 2013 - 10:57 AM"><p>
This works for me when exporting to XLS from the viewer:<br />
<br />
onRender of label element with hyperlink<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(reportContext.getOutputFormat() != "html"){
this.action = null;
}
</pre></p></blockquote>
<br />
Hi...<br />
Thank you for your quick reply...<br />
How to disable sorting when table does not have any data...?<br />
I'm using drill-through,it reloads the report each time when I click on the column header...<br />
This should not happen when table is empty..how to do this?<br />
please help me on this...<br />
<br />
<br />
Regards<br />
Shreelekha
Shreelekha
Please reply to my question Michael
Thanks
Shreelekha
mwilliams
You should be able to create an aggregation in your table to give you a "COUNT". Depending on this value, you could do the same as above, set the action to null. Hope this helps.
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117724" data-time="1371522325" data-date="17 June 2013 - 07:25 PM"><p>
You should be able to create an aggregation in your table to give you a "COUNT". Depending on this value, you could do the same as above, set the action to null. Hope this helps.<br /></p></blockquote>
<br />
Hi Michael..<br />
<br />
Thank you for replying..<br />
I have a report name example.rptdesign<br />
I run the birt report in html format. but the problem is when i export the report as PDF it's <br />
saved without extension(PDf) like `example`.<br />
birt report save without extension(PDF). It should save as `task.pdf`. <br />
<br />
Please help me<br />
<br />
Thanks<br />
Shreelekha
mwilliams
When you export to PDF from the viewer, it's not including the .pdf? Let me know. I've never seen this before. What is your BIRT version again? You said before BIRT 3.2, but there is no such version. Can you look at one of your report's xml source and see what the version info is? Thanks.
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117767" data-time="1371615479" data-date="18 June 2013 - 09:17 PM"><p>
When you export to PDF from the viewer, it's not including the .pdf? Let me know. I've never seen this before. What is your BIRT version again? You said before BIRT 3.2, but there is no such version. Can you look at one of your report's xml source and see what the version info is? Thanks.<br /></p></blockquote>
<br />
Hi..<br />
Thank you for your quick reply..<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<report xmlns="<a class='bbc_url' href='
http://www.eclipse.org/birt/2005/design'>http://www.eclipse.org/birt/2005/design"</a>
; version="3.2.23" id="1"><br />
<property name="createdBy">Eclipse BIRT Designer Version 4.2.2.v201301221637 Build <4.2.2.v20130206-1509></property><br />
Correct me if i'm wrong, my birt version is 3.2.23.<br />
<br />
When I export to PDF from the viewer, it's including the .pdf.<br />
But When I export to PDF from my web application where I have deployed the reports(Reports are done using birt) it's not including the .pdf? I am using all birt viewer plugins which is need..<br />
<br />
Can you give me a solution?<br />
<br />
Thanks<br />
Shreelekha
mwilliams
The BIRT version is actually 4.2.2. It can be kinda confusing, I know.
If it's a problem with exporting from your app, I'll probably need to see more of how you're exporting from it. Especially since it's working fine for you from the web viewer. Let me know.
Shreelekha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="117775" data-time="1371620292" data-date="18 June 2013 - 10:38 PM"><p>
The BIRT version is actually 4.2.2. It can be kinda confusing, I know.
<br />
<br />
If it's a problem with exporting from your app, I'll probably need to see more of how you're exporting from it. Especially since it's working fine for you from the web viewer. Let me know.<br /></p></blockquote>
<br />
Hi...<br />
<br />
Thanks a lot:)..It's working now..<br />
I had applied sorting on column headers(drill-through).<br />
In Ubuntu it is working, I can click anywhere on the column header to perform sorting.<br />
To make it work in Ubantu(12.04). I did changed css added <strong class='bbc'>display:block;</strong> to column header.<br />
Where as in windows we have to click on the text.<br />
<br />
Please suggest me Michael<br />
<br />
Thanks<br />
Shreelekha
mwilliams
Not sure I'm understanding the issue. Is your column header much larger than the text and you only want the link to work when clicking on the text, but it's working anywhere within the header cell on Ubuntu? Or something else? Let me know.
Shreelekha
<blockquote class="ipsBlockquote" data-author="mwilliams" data-cid="117834" data-time="1371796388"><div><p>Not sure I'm understanding the issue. Is your column header much larger than the text and you only want the link to work when clicking on the text, but it's working anywhere within the header cell on Ubuntu? Or something else? Let me know.</p></div></blockquote><p>Hi..</p><p>Thanks a lot for your reply [color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:12px;]Michael.
[/color][color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;font-size:12px;] [/color]</p><p>It's a css change it's working now in windows....</p><p>If I remember correctly I had asked you to send a sample report which has sorting using drill-through but it should not re-run the report when I click on column header.</p><p>You suggested me to use [font="arial, sans-serif;font-size:13px;"] .rptdocument... My bad luck you were busy...
[/font][font="arial, sans-serif;font-size:13px;"] [/font] so you could not create sample report..</p><p>I did a research on this but didn't get any usefull results...</p><p>Michel I need your help,hope you'll help me on this..
</p><p> </p><p>Thanks</p><p>Shreelekha</p>