Solved

SQL Server Select with bold text?

Posted on 2013-01-24
7
2,787 Views
Last Modified: 2013-01-25
In my code below I'm doing a select with the (new line) CHAR(10) statement

Any way I can declare on the SQL side (for my SSRS report) bold text?

[Contact Notes]
 is working correctly with new lines

I need to make the name bold


Select blah,
           blah,
               STUFF(( SELECT ' ' + CC.[First Name] + ' ' + CC.[Last Name] + '-' + B.Notes + CHAR(10)+ CHAR(10)			 
			FROM	dbo.[Client Contact Events] AS B
			INNER JOIN dbo.[Client Contacts] CC
			ON B.[Contact ID] = CC.[Contact ID]
			WHERE	[CVT].[Client ID] = B.[Client ID]
				AND	B.EventType = 'Visit'
				AND	B.[Contact Date] > [CVT].createdDate  FOR XML PATH ('')),1,0,'') AS [Contact Notes]
From myTable

Open in new window

0
Comment
Question by:lrbrister
7 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 38816106
try CHAR(10)+CHAR(13)
0
 

Author Comment

by:lrbrister
ID: 38816143
I think I mis-stated up what I'm trying to accomplish.
In my select above the the carriage returns are returning correctly in SSRS as you can see.

I want to make the NAMES bold in my SSRS. (Yellow highlights below)
I'm fairly sure I could accomplish in SSRS in the expression by bolding everything up to the hyphen...but would rather handle from the SQL side if possible.

Off hand I don;t think it can be done.

SSRS Screen Pront
0
 
LVL 9

Accepted Solution

by:
JonMny earned 250 total points
ID: 38816185
I dont think it's possible. Unless you can use 2008
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 18

Expert Comment

by:UnifiedIS
ID: 38816304
Formatting options should be handled in your presentation layer (the report) so even if possible, I wouldn't recommend it.
0
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 38817675
As JonMny says it can be done with 2008 using html tags:
http://msdn.microsoft.com/en-us/library/cc627491(v=sql.100).aspx
Change your query so it returns a string like:
<b>Dinette Blessinger</b>-Stopping .....
Then set the ' Interpret HTML tags as styles' property on your Contact Notes column.
0
 
LVL 37

Assisted Solution

by:ValentinoV
ValentinoV earned 250 total points
ID: 38818191
If you need part of your string to be formatted differently (i.e. bolded) than the rest of the string, in 2005 you don't have a lot of options.  No HTML, no placeholder in the Textbox...

The only thing you can do is use two separate textboxes and format those as expected.  To put two textboxes next to each other in one table cell, first put a Rectangle in that cell.  Then you can add two textboxes inside that rectangle.
0
 

Author Closing Comment

by:lrbrister
ID: 38818499
Thanks folks. Using 2005 so not possible
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Temporarily disable SQL Replication 7 23
SQL server 2008 SP4 29 34
Data to display differently-SQL Server 4 21
Stored Procedure 2 0
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now