This is a migrated thread and some comments may be shown as answers.

Hyperlink in Q2_2009 no longer works

15 Answers 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sean Davidson
Top achievements
Rank 1
Sean Davidson asked on 07 Jul 2009, 10:04 PM
the workaround provided for ealier versions doesn't seem to work on the Q2_2009 version.  We have a code that uses this workaround using the Q1_2009 version and it was working but when we upgraded to Q2_2009, it basically broke (i.e. it's now displaying the url and the text is no longer clickable).  Any new workaround for this one?  Cheers.

15 Answers, 1 is accepted

Sort by
0
Michael H.
Top achievements
Rank 1
answered on 07 Jul 2009, 11:45 PM
We are experiencing the same issue here.
0
Niklas
Top achievements
Rank 1
answered on 08 Jul 2009, 06:08 PM
If this doesn't work I have to rewrite _a lot_ of code if we upgrade. And we loose key functionality.
0
Jason
Top achievements
Rank 1
answered on 09 Jul 2009, 03:09 PM
Yes, would like to know how to achieve the same functionality.
0
Steve
Telerik team
answered on 09 Jul 2009, 03:38 PM
Hi guys,

This is intentional and is part of our plans to make all rendering formats alike. Till now this behavior was due to the browser which handled the html and we simply did not strip/handle the html tags in any way, which we consider was an omission on our end. However with the introduction of the HtmlTextBox item, we decided it is about time to change this behavior and allow html only through this item. Currently it supports only text formatting options, but soon this would change and other html tags (that are useful for the report product) would be handled as well.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jason
Top achievements
Rank 1
answered on 09 Jul 2009, 04:42 PM
So just so we are on the same page, are you saying we could potentially create a hyperlink with the htmlTextBox control ? If so, are we able to bind data as well to it ?
0
Sean Davidson
Top achievements
Rank 1
answered on 09 Jul 2009, 10:33 PM
The way i understood Steve's email is that they're ONLY supporting text formatting options for the htmltextbox.  But yeah... Steve, please confirm if there's an alternative or workaround in displaying hyperlinks on reports.  Need the answer urgently please.  Cheers.
0
Steve
Telerik team
answered on 10 Jul 2009, 06:32 AM
Hello Sean,

This has never been a "feature" since it was the browser handling the html and not our reports, so in that sense this is not a workaround. If this is a must for your web reports (as it works only on web), then please stick to Q1 SP1, we are currently considering the implementation of hyperlink in the HtmlTextBox.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jeremy Mann
Top achievements
Rank 1
answered on 02 Sep 2009, 02:07 PM
I just wanted to post this here since I was having this issue and figured it might help someone. I was unsure of how to get links working in Q2 2009 (build 807) since the Q1 workaround broke. I did it using the HTMLTextBox control by clicking the "HTMLview"  button and then just coded a link in there and it works (as bindable) for webreports. 

Example:
<a href="http://someURLtoGOto.com/Q?={Fields.[Class_ID]}">{Fields.Professor}</a>
0
Chavdar
Telerik team
answered on 02 Sep 2009, 03:04 PM
Hello Jeremy Mann,

Thank you for posting the sample. I just wanted to add that build 807 to which you refer is the Q2 2009 SP1 release in which the issue was fixed for the TextBox report item and support for the <a> tag was additionally added for the HTMLTextBox item. So the example will work only with this release but not with Q2 2009.

For more information about the fixes and the new things in the release, please check the Release History.

All the best,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris McMahan
Top achievements
Rank 1
answered on 16 Oct 2009, 06:42 PM
I don't know if anyone else needs this functionality or if this is posted somewhere else, but if you want to use javascript within a HTMLTextBox you can leverage the anchor tag like so.

<a href="javascript:parent.AlertWindow('here')">Click Me</a>

and the javascript

function AlertWindow(here)
{
     alert(here);
}

You have to use the parent. considering the report viewer is an iframe.  From there you can do whatever.  I was searching around for a while trying to find functionality like this and didn't find anything.  I ended up on this thread and made a work around from the examples here.

Although I do have one question about the HTMLTextBox.

I'm trying to just use a field in my text box.  I add it in the expression builder, and select the field.  

All I have in the field is the field itself, no html around it.

{Fields.Name}

Once the report loads, it throws this error on the htmltextbox:

An error has occured while processing HtmlTextBox 'htmlTextBox1':
' ' is an unexpected token. The expected token is ';'. Line 1, 


Any thoughts?
0
Steve
Telerik team
answered on 19 Oct 2009, 08:32 AM
Hello Chris,

This error means that the html you've provided is not properly parsed for some reason. The HtmlTextBox expects XHTML compliant input, so please verify that this is the case by checking it here. If it is and you're still getting this error, please paste a small excerpt from your html that causes the problem and we would investigate.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris McMahan
Top achievements
Rank 1
answered on 19 Oct 2009, 02:42 PM
I'm not really even trying to use HTML in the box yet.  I'm just trying to list the contents of the details section for my report first.  The contents of my HTMLTextBox, which were generated from the "Expression..." window, are:

{Fields.Name}

All I want it to do is list the contents pulled back from my query for the column titled "Name" for the time being.  This format for populating this text box is in an example on the http://www.telerik.com/help/reporting/report-items-html-text-box.html page.  It uses the {Fields.ProductNumber} field.

I feel like I'm missing something pretty obvious.

Thank you for the help though.
0
Steve
Telerik team
answered on 19 Oct 2009, 04:10 PM
Hello Chris,

We understand that you do not have html along with the Fields.Name in the Expression, but what does the column Name from your datasource return - is it html? It certainly looks so, as the HtmlTextBox is trying to parse it and throws an error.
Moreover, when your fields do not contain html, it is recommended to use the standard TextBox item, which would be processed faster by the reporting engine.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris McMahan
Top achievements
Rank 1
answered on 19 Oct 2009, 04:48 PM
Oh, I apologize for misunderstanding.

The returned column is usually composed of just characters for a name, however, I realized after reading your last post that there is an & symbol in the returned values.  I reran the report again, this time filtering the data differently so that all instances of the & and any other symbols were gone.  This time the report came back correctly.   

Is there a way to allow these symbols to be displayed correctly in an HTMLTextBox?

Thank you again for the speedy help on this matter.
0
Steve
Telerik team
answered on 20 Oct 2009, 07:39 AM
Hello Chris,

According to the HTML specification (and the general XML specification as well) the "&", "<" and ">" characters as considered special (markup delimiters), so they need to be encoded in order to be treated as regular text. For example the "&" character can be escaped with the "&amp;" entity. More information on the subject you can find in this w3.org article.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Sean Davidson
Top achievements
Rank 1
Answers by
Michael H.
Top achievements
Rank 1
Niklas
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Steve
Telerik team
Sean Davidson
Top achievements
Rank 1
Jeremy Mann
Top achievements
Rank 1
Chavdar
Telerik team
Chris McMahan
Top achievements
Rank 1
Share this question
or