Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop trimming text fields

Status
Not open for further replies.

graabein

Programmer
Oct 9, 2002
186
NO
Hi, I have to create a text file that outputs data in certain chuncks like this:

Name, 10 chars [1-10]
Number, 2 chars [11-12]
Code1, 3 chars [13-15]
Code2, 3 chars [16-18]

I put all the fields from the dataset next to eachother in a single table cell and the idea is to let the user export to Excel and save as text.

I've tried running a SQL query that cast my data as CHAR(n) and I've tried formatting each field with Format(Fields!name.Value, "{0,-10}") but the damn thing keeps trimming my strings!

How can I output a report with more than a single whitespace (aka pad right)?

[elephant2]
graabein
 
Incredible. I even tried selecting everything into a single text column from the database but SSRS still trimmed multiple whitespaces within the table cell! Somebody shoot me! LOL.

[elephant2]
graabein
 
Problem solved (not really). When I export to Excel the whitespaces appear so it was just the HTML rendering that fooled me.

If somebody finds a solution to this I'm still interested in knowing it. There are times you want to control screen rendering also.

[elephant2]
graabein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top