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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display String: Left Side - Right Side 2

Status
Not open for further replies.

wld1957

Technical User
Feb 3, 2006
68
US
I have been trying to do the following in the display string:
take
Balance to Plaintiff - $1,000.00
and display it as:
Balance to Plaintiff: $1,000.00
I want to show the first part on the far left (left justify) and the balance on the far right (right justify)of the display string.
I have tried several trimleft and trimright etc.. and looked though the forum but do not know if this is possible within the string. My current display string is as follows:
"Balance to Plaintiff" & " - " & {@Balance to Plaintif-STOB}
As always any ideas would be appreciated. Thanks in advance.
 

"Balance to Plaintiff:" +
space((50 - len("Balance to Plaintiff:" & totext({@Balance to Plaintiff-STOB},"#.##")))) +
totext({@Balance to Plaintiff-STOB},"#.##")

This would work; adjust the 50 to whatever number gives you the proper spacing.

However, this only works with monospaced fonts, such as Courier, which is probably not the look you're going for.

Since you're combining text with a number, the number has to be converted to text - once it's text, it's difficult to line up properly

I'm wondering why this would be necessary, as opposed to a text field for the label and another field for the balance.
 
That will work. I believe you are correct. It will be easier to just create a different text field. This is probably what I will end of doing. Thanks.
 
Here is another option:

Drop a text box into your report with the text "Balance to Plaintiff"
While in the text box right click and select text format.
create a right justified tab wherever you want it.
drop your {@Balance to Plaintiff-STOB} or a formula with totext({@Balance to Plaintiff-STOB},"#.##") at the tab.
size the text box where you want it.



_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Thanks for the help. It took me a little longer to figure out as I have not worked with the tabs before. It works well. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top