Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Monday, March 12, 2012

How to add newline in column of type nvarchar

Hi,
I want to add a newline in a content of sql column (using t-sql and not asp.net textbox) so when content is being rendered in a .net textbox I get separate rows, so instead
col1 col2 col3
I woule like to have
col1
col2
col3
Thanks

You can use CHAR(13) to insert a carriage return into the string. e.g.

INSERT INTO MyTable (MyStringColumn) VALUES('My name is'+CHAR(13)+'Colin Mackay')
See also SQL Server Books-On-Line:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_6xte.asp
Does this help?

|||Yes, that's it, thanks

How to add link in a report as a button?

Hi,

I want to add a link in a report, possibly a url link or a link to other report. One way of doing this is to go to properties of textbox and then update the jump to option.

But how to do this through a click of a button, inside the report?

I am having Microsoft Visual Studio 2005, designer's version.

thanks

You can use the Action property of a textbox and format that as a standard link (underlined).

For a 'button', I believe you'd have to make an image per button and then use an image control, and again leveraging the action property.

There may be custom controls out there that will make the button for you and you'd just set the caption.. but I don't know for sure.