4
votes

When creating a very simple report containing only a textbox, I am able to put an action to that textbox in SSRS to make the textbox clickable:

Add Action to Textbox

When previewing the report in the SSDT preview pane, the textbox is clickable as expected:

Textbox is clickable

However, as soon as I upload the report to Sharepoint and view it in a browser, only the text inside the cell is clickable (instead of the entire cell):

SSRS Textbox action on Sharepoint only text clickable

Changing compatibility views, using different browsers doesn't change anything.

Is there any way to make the entire cell clickable when viewing my reports in Sharepoint (2013) too?

(Maybe a setting I'm missing with which to make the rendering of Sharepoint SSRS the same as SSDT or Report Viewer rendering?)

1

1 Answers

4
votes

No, this is not possible in SSRS with text.

A possible work around, assuming the text is static, is to use an image in your cell and attach the action to the image.

Reason for this occurring:

On the web:

When reports are viewed on the web through SSRS in remote mode, they ultimately get converted to HTML. Textboxes get converted to a <div> tag. A textbox with an action gets rendered as a <div> tag containing an <a> tag. As a result, when viewed in the web, your browser interprets the text as regular hyperlink in a <div> instead of "textbox" object. Due to the implementation of <a> in HTML, only the text is actionable, not the entire box. This can be proven by rendering the report in your browser and inspecting the element.

One possible reason it works this way, is that in plain HTML (before v5) it isn't correct to put a complete DIV inside an anchor tag (see this discussion for more about that). Making the text inside an anchor-tag display like a block (via CSS) would be correct, but IE7 (the compatibility mode reports are rendered in by default) isn't that good at working with the CSS display: block statement :).

In SSDT:

In SSDT, the report is executing using the WinForms ReportViewer. What this means is that the Preview screen will also use WinForms controls to build the preview. As a result, a textbox in this case will be represented by the WinForms control TextBox object. This object's actionable area is not just the text but the entire bounds of the object.