Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

I cannot get this textbox to right align

Posted on 2010-11-24
9
1,584 Views
Last Modified: 2014-08-06
I have 4 tablix in this report.  This particular column appears in 3 of the tables.  If I set the TextAlign property to left alignment, it works fine.  But if I set it to Right alignment then it become centered.  This data field is from a dataset and it's a char(10) field.  I then set the Format property to Trim(field) and that didn't make any difference either.  I then set Direction property to RightToLeft and that didn't work either.  Can anyone suggest something to fix this.  Thanks.
0
Comment
Question by:lapucca
9 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 34207586
Is it possible to modify the SELECT statement to include a RTRIM() on your char(10) column to get rid of the trailing spaces?
0
 
LVL 28

Expert Comment

by:sammySeltzer
ID: 34207605
Apparently, someone else has similar issue as you.

Please see their recommended solutions and see if it works for you.
http://stackoverflow.com/questions/531383/reporting-services-right-item-alignment

Good luck
0
 

Author Comment

by:lapucca
ID: 34207899
Sammy, This is for the text in this textbox.  My other textboxes in all 4 table are right aligned with no problem except this one and it's just mind boggling!  
Eric, I already use trim in the Format property of the report but I will apply Rtrim to the sp and let you know if that works.  
thank you.
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:lapucca
ID: 34207960
Modify sp to

rtrim(ltrim(r.EmpAccountNo))

and that didn't make a difference either.  Very frustrating becuase all the other textboxes in all 4 tables formats to the right alignment except this textbox.  I've also tried deleting the column and then insert the new column and add the data field to it and that doesn't work either.

Thanks.
0
 
LVL 32

Expert Comment

by:Erick37
ID: 34208254
That's strange that RTRIM did not work, I tried it on a sample report and it managed to remove trailing spaces and align the text to the right.

Another way to do this is to open the Placeholder Properties box by double clicking the textbox and modify function [fx] for the value to include the Trim.

e.g.
=Trim(Fields!EmpAccountNo.Value)
0
 

Author Comment

by:lapucca
ID: 34208378
Hi,  I had that formula to trim in the textbox's "Format" property and that didn't make any difference atl all.
This is a textbox that is in a cell of a tablix.  The TextAlign property of the textbox is set to "Right".  The triming and convert is done on the sp side.  I had a formt expression to trim the field blank spaces but now I removed it.  The padding to left and right was 6 ,now I set it to 2.  
I don't know what function[fx] property are you referring to.
With all that, the column text is still "Center".  Thank you.
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 500 total points
ID: 34208522
In your Tablix, double click on the textbox you need to format and the Properties box will display.
From there you click on the button next to the Value box to enter the Expression.  See attached.

Alternatively, right click the textbox and select Expression...

Include the Trim function in the existing expression. Placeholder Properties
0
 

Author Closing Comment

by:lapucca
ID: 34209871
OMG, finally that worked.  I don't have to do this for other textboxes and why this one?  Btw, I'm developing this report in B.I. .net 3.5.  And, also, that I have already apply trim to my sp select statement.  Very odd!  rtrim (ltrim( CONVERT(nvarchar(10), r.EmpAccountNo))) as EmpAccountNo
Thank you.
0
 

Expert Comment

by:EDCTECH
ID: 40245010
I found that Trim worked to fix things for centering and CanGrow issues as well that popped up after converting SSRS 2005 reports to 2010.  All of the fields had looked fine when they were displaying on the screen, but they were different when the report was printed.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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