[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

How do I add carriage returns to text that goes into a textbox?

I want to display the results of a query in a rather odd way.

It would read something like this in a single cell of a table...

Smith, John
C-PA
10

from some sort of concactenated string that would read like this...

=tbl_All_Lname + ", " + tbl_All_Fname + "\n" + tbl_All_Position + "\n" + tbl_All_NumHoursWorked

My problem is that I want to put those \n as actual carriage returns inside the cell of that table.
0
M3hcSS
Asked:
M3hcSS
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
put char(13) instead of "\n"
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
actually, better is char(13) + char(10) , but otherwise I agree
0
 
M3hcSSAuthor Commented:
Let me say that this is an expression inside the cell (right click on cell, choose expression).

When I try the above I get

The Value expression for the textbox ‘tbl_All_Fname’ contains an error: [BC30108] 'Char' is a type and cannot be used as an expression.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
M3hcSSAuthor Commented:
Duh, I forgot to add that I am using Reporting Services only.
0
 
Anthony PerkinsCommented:
>>Duh, I forgot to add that I am using Reporting Services only.<<
Than you may want to post in a more appropriate Topic Area such as:
http://www.experts-exchange.com/Databases/Reporting_Tools/
0
 
M3hcSSAuthor Commented:
Chr(13) works.
0
 
Anthony PerkinsCommented:
Correct.  That is the VB.NET function that returns a soft return (Cr) as opposed to a hard return (CrLf) and equivalent of T-SQL's CHAR() function.  In C# you can use "\n"
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now