I'm using SQL Reporting Services. The data I'm reporting on contains Hyperlinks. I have a output field on the report containing the full hyperlink. I click on it, but it doesn't act like a hyperlink. Can this be done using SSRS?
-
Wednesday, January 16, 2013 11:08 PM
I'm using SQL Reporting Services. The data I'm reporting on contains Hyperlinks. I have a output field on the report containing the full hyperlink from the dataset. Once the report is rendered, I click on the output hyperlink field, but it doesn't act like a hyperlink (just text). Can this be done using SSRS; return hyperlinks from dataset data, and click on them to redirect to files, or websites?
All Replies
-
Thursday, January 17, 2013 1:20 AM
Hi,
Just right click on the textbox and click TextBox Properties:
Then Actions-> Go to URL-> Fx-> Fields (dataset)
Then add the field's value that contains the URL:
Cheers
Please Mark as Answer or Vote As Helpful if a post solves your problem. MCP, MCTS, MCITP
- Edited by SoheilBakhshi Thursday, January 17, 2013 1:21 AM
- Proposed As Answer by Mike YinMicrosoft Contingent Staff, Moderator Friday, January 18, 2013 8:39 AM
-
Friday, January 18, 2013 9:20 AMModerator
Hi EurekaMWS,
Just add to SoheilBakhshi’s answer. In Reporting Services, we can import HTML content into a report. In this issue, you can refer to the following steps:
1. In a textbox , first double click, and then right click. In the right click menu, select Create Placeholder.
2. Set the expression of Value as follows:
="<a href="+ """" + Fields!URL.Value + """" +">" + Fields!URL.Value + "</a>"
If http:// is not included in the URLs stored in the database, use the following expression instead:
="<a href="+ """" + "http://" + Fields!URL.Value + """" +">" + Fields!URL.Value + "</a>"
Reference:Regards,
Mike Yin
TechNet Community Support -
Friday, January 18, 2013 4:51 PMThank you. I did see this, but couldn't get it to work. I placed "File:\\..." on front of string, but SSRS still doesn't recognize it as a link. If I export to PDF, it works like a charm. I'm going to try some of the other great suggestions in a bit. All is appreciated!
Michael W. Schulte
-
Friday, January 18, 2013 5:15 PM
Still didn't work for me. The result output (in a data grid column) on the report looks like:
<a href="\\servername\real$\Location Information Files\31266\2012\123 Southern Ave\TaxBills\12-1325968_TAXBILL1_2012P2012.pdf">test</a>
Note that the data in the database is:
"\\servername\real$\Location Information Files\31266\2012\123 Southern Ave\TaxBills\12-1325968_TAXBILL1_2012P2012.pdf"
Just a location to a PDF file attached to other data.
Looks like data in the SSRS result output is just treated as TEXT, and not a link.
Thanks. I'm going to try your second suggestion now.
Michael W. Schulte
-
Friday, January 18, 2013 5:24 PM
I tried the second way too. Still does not show output as a link. Just as text. Action on page takes arrow away as if I can select, but when I try to select the column with file path in it, does not act on selection (just like hitting text and not a link).
Michael W. Schulte
-
Friday, January 18, 2013 5:28 PMNote that the report didn't transform to HTML format, kept value as text. Thus output looked like
<a href="\\servername\real$\Location Information Files\31266\2012\123 Southern Ave\TaxBills\12-1325968_TAXBILL1_2012P2012.pdf">test</a>
and not a link.
Not sure if it is a text formatting issue and I don't have some sort of HTML data checkbox marked???
Still looking.
Michael W. Schulte
-
Friday, January 18, 2013 5:29 PM
Note that this did allow me to click on the column of data as if it wanted to work, but when I clicked on the file path in the value, nothing happened.
Thanks,
Mike
Michael W. Schulte
-
Friday, January 18, 2013 5:53 PM
A bit of good news, but still doesn't work completely. Your suggestion I misread - Sorry. I didn't do the "CreatePlace Holder" part - LOL Ooops. I did it on the Text Properties, Expression, on the field.
I just did the Create Place Holder - it did make column output look like links. Once I click on the values, no action is taken; no redirection. Still trying to figure that out. I have the option in the place holder as HTML (checked).
Going to tinker a bit more on this. Getting close.
Thanks,
Mike S.
Michael W. Schulte
-
Friday, January 18, 2013 6:34 PM
OK, I discovered that it depends on the value that I have in the selection. That is, what link will work and which ones wont.
Initially, I had links to internal files. They do not work (redirect).
When I changed the selection criteria in the dataset for the column with the file path to a value of "http:\\www.google.com", the redirection worked.
This looks like a issue on the report server where it can redirect to external websites, but not to internal files.
Any thoughts are welcomed.
Thanks,
Mike S.
Michael W. Schulte
-
Friday, January 18, 2013 10:40 PM
Mike Yin,
Thank you! After working with your comments, it worked!
Issue that I stated was caused by running in MODIFY REPORT mode; Links didn't redirect while running report from REPORT MODIFY. When I ran out of the editor tool, I could actually go to result file links from report output; links redirected to files location (pulled up files great!).
Your help is much appreciated!
Mike S.
Michael W. Schulte
- Marked As Answer by EurekaMWS Friday, January 18, 2013 10:42 PM


