views:

2465

answers:

5

I have a report with many fields that I'm trying to get down to 1 page horizontally (I don't care whether it's 2 or 200 pages vertically... just don't want to have to deal with 2 pages wide by x pages long trainwreck). That said, it deals with contact information. My idea was to do:
Name:        Address:   City:        State:  ...
Jon Doe     Addr1       ThisTown   XX ...
                 Addr2
                 Addr3
----------------------------------------------------------
Jane Doe   Addr1       ThisTown   XX ...
                Addr2
                Addr3
----------------------------------------------------------

Is there some way to set a textbox to be multi-line (or the SQL Result)? Have I missed something bloody obvious?

Thanks in advance!

A: 

I believe you need to set the CanGrow property to true on the Textbox. See http://msdn.microsoft.com/en-us/library/ms159116(SQL.90).aspx for some details.

Sean Carpenter
A: 

The CanGrow Property is on by default, and I've double checked that this is true. My problem is that I don't know how to force a line-break. I get the 3 address fields that just fills a line, then wraps to another. I've tried "/n", "\n" (since I can never remember which is the correct slash to put), <br>, <br /> (since the report will be viewed in a ReportViewer control in an ASP.NET website). I can't think of any other ways to wrap the text.

Is there some way to get the results from the database as 3 lines of text/characters?

Pulsehead
+2  A: 

FYI, I continued to research and answered my own question. From: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2235413&amp;SiteID=17

I just altered my report's text box to: "=Fields!Addr1.Value + VbCrLf + Fields!Addr2.Value + VbCrLf + Fields!Addr3.Value"

Pulsehead
A: 

link break do this

chr(10)

zhengokusa
A: 

I had an additional problem after putting in the chr(10) into the database.

In the field (within the report) add in...

=REPLACE(Fields!Addr1.Value, CHR(10), vbCrLf)

Sam