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!

Smartest way to align text 1

Status
Not open for further replies.

jollyreaper

Technical User
Jul 25, 2005
105
US
I have a report that is trying to present several calculations lined up properly.

What I'm trying to do is something like this:

Units: @unitformula
Options: @option formula
========================
Total: @total formula

When I first started using Crystal, I would have done that by making the text separate objects, putting the formulas next to them, and then beating on the "align sides" feature until it looked halfway not crappy. Total PITA.

I felt very smart when I realized I could just create the whole text object and put my formulas in there. The only problem is this makes aligning the data difficult. I use tabs to get the formulas a uniform distance away from the text but then the right sides of the numbers don't align properly. It looks something like this:

Units: $400,001.00
Options: $2,342,223.00
========================
Total: $2,442,224.00

Argh!

I want it to look like this:

Units: $ 400,001.00
Options: $ 2,342,223.00
=========================
Total: $ 2,442,224.00

I know I can accomplish that with all the numerous stupid little boxes. The question is, is that the smartest way to do it? I really hope there's a smarter way I don't know about.
 
As you can see by your post, what you want it to look like probably isn't exactly.

I would suggest that you NOT use text objects.

Since you didn't state how it shouyld be aligned, rather gave a graphical representation of some floating format, I would suggest that you place the text objects for the text portion, then drop your formula fields in and right align them, that's the standard look and feel.

-k
 
Grr, curse of the stupid fonts. The editing window fonts are serrifed, the post renders with arial.

How I wanted it aligned was with the right-side zeroes aligned vertically, just like you'd have on an accounting report.

The problem with the right aligning is that it will affect everything, that is unless I keep the labels and data separate. Ok, looks like there's no easy way to do this. That's what I was afraid of. Thanks anyway!
 
That IS the easy way, create seperate objects.

Or if you have some overiding reason why you think text objects are better, you can select the embedded field within a text object and make it right aligned.

-k
 
Well, the reason why I think the separate objects isn't the easy way is because they can be a pain to align properly. Crystal has a ton of stuff it can do that Excel can't even dream of but for other areas, Excel is much faster. The dreaded trade-offs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top