Groups | Blog | Home
all groups > sql server reporting services > august 2006 >

sql server reporting services : How do I control the appearance of links in a report?


Chris G.
8/31/2006 11:05:02 AM
SSRS 2005

I am rendering reports in an ASP.NET app using the Report Viewer Control.

I have data values (text boxes) in the reports which are links that allow
the user to drill down/through to other reports.

Ideally I would like these data values to appear normally (black text) when
rendered to print output, but to appear as hyperlinks (blue underlined text)
when rendered in the Report Viewer Control.

What is the best way to accomplish this?

If I set text properties on these text boxes to make them look like
hyperlinks in the Report Viewer Control, then they also look that way when
printed which is undesirable.

I do not see any properties in the Report Designer or Report Viewer Control
which would allow me to control this behavior.

--
weilu NO[at]SPAM online.microsoft.com
9/1/2006 3:06:30 AM
Hello Chris,

Based on my research, you could not control the appearance differently in
the report and in the print output. This is by design.

To provide your feedback directly to the product groups:
http://connect.microsoft.com/SQLServer

Thank you for your understanding.

Sincerely,

Wei Lu

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

weilu NO[at]SPAM online.microsoft.com
9/5/2006 12:00:00 AM
Hello Chris,

Does my suggestion make any sense to you? Please let me know if you have
any question.

Sincerely,

Wei Lu

Microsoft Online Community Support
Chris G.
9/5/2006 12:12:02 PM
[quoted text, click to view]

Follow up questions:

1. What do you mean that this is by design? Why would I want to "see"
hyperlinks in printed output? I want the user to know there are hyperlinks
there when they are in interactive mode, but of course such rendering has no
value when the report is printed.

2. Is there a way to write code that knows which renderer (print, HTML, etc)
is being used, and then dynamically format the text boxes at that time?

-- Chris


--
Chris, SSSI


[quoted text, click to view]
weilu NO[at]SPAM online.microsoft.com
9/6/2006 12:00:00 AM
Hi Chris,

If you open a web site like http://www.microsoft.com/careers/default.aspx,
you could see all the links in the left panel have a underline. Then, when
you try to print this page, you could also find the underline in the print
view. That means the printer will print exactly all the content you see in
the page.

In the report, if you use the jump to property, the user will get the
cursor changed to be a hand when move the cursor on to it.
I think this will notify them that the text could navigate to a url.

Also, the print is not a render extension in the reporting services. So you
could not write code to control the print behavior in reporting services.

Another choice is you could use the Report Web Services to export the
report to a HTML file and then, you could apply a CSS file on it. You could
specify the <a> tag in the HTML to have a hover format which is underline
and the common format without underline.

Sincerely,

Wei Lu

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Chris G.
9/7/2006 11:25:01 AM
Hi Wei,

Thank you for all of the information.

[quoted text, click to view]

I understand what you are saying. What I was looking for was a feature that
is like the one in the Actuate reporting tool. In the Actuate tool, when you
define a link in a report, it is automatically rendered (visually formatted)
as a hyperlink when output to DHTML format, but when rendered to printing
formats such as PDF, etc. appear as plain text.

There are merits to both approaches, but I was trying to do with SSRS what I
can do in the Actuate tool.

[quoted text, click to view]

The problem is there would be no immediate visual cue as to which fields are
hyperlinks. The user would have to hover the mouse over each field which is
not very user friendly.

[quoted text, click to view]

Understood.

QUESTION: But what about the PDF render extension? Could I eliminate the
hyperlink formatting when the report is rendered to PDF?

[quoted text, click to view]

True, but lots of custom coding is beyond the scope of the project I am
working on.

--
Chris, SSSI


[quoted text, click to view]
Chris G.
9/7/2006 11:54:02 AM
[quoted text, click to view]

That is what I am doing also.

[quoted text, click to view]

Exactly, and that is why I was hoping there was a simple way to prevent it.

But in the big picture, this is not the biggest problem I am faced with
right now... ;-)

--
Chris, SSSI


[quoted text, click to view]
Bruce L-C [MVP]
9/7/2006 1:32:32 PM
I just underline and make blue the text for the link. However, the link is
there for pdf, excel etc.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

AddThis Social Bookmark Button