0
votes

I've created an SSRS report that can have either one or two HTML links in one column. I have set the placeholder Markup type property to "HTML - Interpret HTML tags as styles". I have an expression that builds the HTML output.

=iif(Not IsNothing(Fields!image1Name.Value), "<a href=""" + Fields!baseURL.Value 

+ "/imgs/" + Fields!image1Name.Value + """ >" + Fields!image1Title.Value + "</a>", "")

+ iif(Not IsNothing(Fields!image1Name.Value) AND Not IsNothing(Fields!image2Name.Value), "<br/>", "")

+ iif(Not IsNothing(Fields!image2Name.Value), "<a href=""" + Fields!baseURL.Value 

+ "/imgs/" + Fields!image2Name.Value + """ >" + Fields!image2Title.Value + "</a>", "")

The second link href renders as the href for the first link and the title for both links renders correctly. This behavior only appears when exporting to Excel. Everything renders correctly when exporting to PDF. This is perplexing and I don't see any issue with my html. Does Excel not render HTML the same as PDF?

Note: When I create two columns and put their respective HTML links in them, it works fine when exporting to Excel. The requirements of the this report is to have these links display in one column.

1

1 Answers

1
votes

This is a limitation of Excel. The link is a property of the cell. I've tried creating two links within a single cell, in Excel directly (no SSRS) and haven't had any success. I didn't spend too long on this, so I may be missing something; I'm curious how you created two links in one cell.