Groups | Blog | Home
all groups > sql server reporting services > may 2007 >

sql server reporting services : How can I display the text "\n" in a chart's label



ANeelima
5/11/2007 11:48:01 AM
I loaded an .rdl file into reporting services. The .rdl file needs to
display the following text "domainName/norman" in the <label> when displaying
the results of a query in a chart.

It looks like reporting services is manupulating '/n' in the text as a
newline character and hence breaking the text into two lines:
domainName
orman

How can I prevent that from happening since my report needs to display
domain user names in the chart's label.

Thanks.
--
SleepyLab
5/12/2007 11:09:40 AM
try "//n"
ANeelima
5/13/2007 1:00:00 PM
I have already tried that. All it displays is

domainName/
orman

Looks like reporting services sees / n as a newline character and executes
the string.

--
ANeelima


[quoted text, click to view]
SleepyLab
5/13/2007 9:50:23 PM
[quoted text, click to view]

What if you did a string.replace("/n","/ n") ?
ANeelima
5/14/2007 6:33:02 AM
I have tried that as well. All it will do is add a space.

Desired string: domainName/norman
Replace with "\ n": domainName/ norman

I was looking into a solution where I don't have to add the extra space. I
mean
is there any documentation in reporting services that talk about special
characters in strings and how to handle them? This can be more of a generic
problem.

We have seen problems where accented characters are entered. If a user's
name is say "MyÄTest" (notice the character above A), the chart displays it
as
"My?Test"

Thanks.

--
ANeelima


[quoted text, click to view]
SleepyLab
5/14/2007 11:38:05 AM

[quoted text, click to view]

Hmm...

What version on SQL RS are you using?

I can't reproduce either of these problems here using RS2005 Sp2.
SleepyLab
5/14/2007 11:39:54 AM

[quoted text, click to view]

Scratch that - I just reproduced the "\n" issue. I was using "/n"
with no problem.
SleepyLab
5/14/2007 11:49:56 AM

So it interprets the \n sequence - but not \\ - well that's a bug;
IMHO.

if you convert the string (or just the "n") to uppercase - it should
prevent the issue.

Can't reproduce the Accented character issue - works finr for me

Check the regional settings of your browser and/or the encoding of the
report.
ANeelima
5/17/2007 10:25:01 AM
I am sorry but what is IMHO? Yes, converting to uppercase obviously will
solve the problem but I was just curious as to how to solve it without
changing the text. Perhaps it is a bug.

Thanks!
--
ANeelima


[quoted text, click to view]
AddThis Social Bookmark Button