Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

String formatting in RS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian - 09 Jul 2008 02:43 GMT
Hi I am having trouble formatting strings in RS.

For example I have the following expression I am using
=Fields!Prefix.Value & " " & Fields!FIRST_NAME.Value & " " &
Fields!LAST_NAME.Value & chr(10) &
Fields!ADDRESS_1.Value & " " & Fields!ADDRESS_2.Value & chr(10) &
Fields!CITY.Value & " " & Fields!STATE_PROVINCE.Value & " " &
Fields!COUNTRY.Value & chr(10) &Fields!ZIP.Value

This is in a cell in a table

When I preview this the carriage return works fine but when I deploy tthe
report it doesn't work. I have also tried using  chr(13) but it doesn't work.

Also if I have text in a cell but I want part of it to be bold how would I
do it.

Finally for the moment anyway I found how to do check boxes  by [Alt] key
and type 0168 on the numeric keypad -- this value represents the empty check
box character (for false value). and  for a checked check box (representing
true values), hold down the [Alt] key and type 0254. using Wingdings but once
again works in preview but not in the deployed report. Any tips?

Is there a reference somewhere that covers this sort of stuff? I'm
struggling to find it in help. If it is in help what parameters do you use to
get to it.

Thanks
Bruce L-C  [MVP] - 09 Jul 2008 13:23 GMT
Try chr(10) & chr(13)

RS 2005 does not support rich text. You cannot bold a particular word.

Signature

Bruce Loehle-Conger
MVP SQL Server Reporting Services

> Hi I am having trouble formatting strings in RS.
>
[quoted text clipped - 29 lines]
>
> Thanks
Jerry H. - 09 Jul 2008 16:27 GMT
> Hi I am having trouble formatting strings in RS.
>
[quoted text clipped - 24 lines]
>
> Thanks

In your expression line, replace "chr(10)" with "vbCrLf", without the
quotes to see if that works.

I don't know about Bolding part of a cell, however.
Steve MunLeeuw - 09 Jul 2008 17:23 GMT
You can't bold part of a textbox, in 2008 you can though with RichTextbox
support.
for vbCrLf I use System.Environment.NewLine

Thanks,
Steve MunLeeuw
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.