Right justified auto-trimming?? 
Author Message
 Right justified auto-trimming??

I have a report that I've converted from FoxBASE+/Mac to FoxPro/Mac, and
much of my formatting was done by using right justified fields which I
would pad with trailing spaces to make the columns line up correctly.
However, in FoxPro, it appears that such trailing spaces are stripped off
again, putting all of my data flush right, which is NOT what I want.  I
have flipped through all of the SET commands, and looked at the options I
saw in the report builder, but I have not yet seen a way around this.
It would save me a significant amount of work if I didn't have to reformat
all of my reports because of this "feature," so if anyone knows of a way
to keep my trailing spaces, I'd be very happy to hear about it..!

Anyway, thanks in advance..

 -Paul Hagstrom



Sat, 01 Feb 1997 20:31:13 GMT  
 Right justified auto-trimming??

Quote:
> I have flipped through all of the SET commands, and looked at the options I
> saw in the report builder, but I have not yet seen a way around this.

I should add that I have seen the "Trim" checkbox on the field setup
screen -- BUT IT IS ALWAYS DISABLED!  No matter how I justify the

field in the .frx file to turn it ON (and the checkbox does become
checked), but what I want to do is turn it OFF!

Anyway, I wanted to say that to avoid "obvious" answers -- If somebody
knows what controls the enabled status of that checkbox, I'd love to know
what it is..

 -Paul Hagstrom



Sat, 01 Feb 1997 21:05:54 GMT  
 Right justified auto-trimming??

Quote:
> > I have flipped through all of the SET commands, and looked at the options I
> > saw in the report builder, but I have not yet seen a way around this.

> I should add that I have seen the "Trim" checkbox on the field setup
> screen -- BUT IT IS ALWAYS DISABLED!

Well, I kicked off my 90-day free support with this one, and Microsoft told
me that, yes, FoxPro does indeed do what I say it does.  No way around it
as far as they know, but to left justify the fields and use PADR() field-
internally -- which will probaby _work_, but means that I've got a whole
lot of boring work ahead of me to alter all of my fields in all of my
reports.

Pfft.  Anyway, in case anyone cares..

 -Paul Hagstrom



Sat, 01 Feb 1997 21:54:20 GMT  
 Right justified auto-trimming??


Quote:
> Pfft.  Anyway, in case anyone cares..

One more thought are your fields set up as numeric or character? If they
are character you may be able to solve the problem by changing the field
type.

--



Tue, 04 Feb 1997 08:25:21 GMT  
 Right justified auto-trimming??

Quote:
> One more thought are your fields set up as numeric or character? If they
> are character you may be able to solve the problem by changing the field
> type.

They were set up as character fields because I have a 7-column report in
which arbitrary columns may have to contain labels (but certainly the
leftmost).  So, my report just had the character field slots and I had
a UDF called by the first one fill them all with the appropriate values
for the column we were on.  As far as I know there isn't an easier way
to do this, but it was originally written in FoxBASE+/Mac, and perhaps
there is a way to to labels like that in FoxPro (though I don't recall
seeing anything like that).

As it turned out, it really wasn't as agonizing as I thought it would be,
but I now have all of my report fields defined left justified.

 -Paul Hagstrom



Wed, 05 Feb 1997 07:03:20 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Right-Justify SAY?

2. How to right justify menu bars in vfp6 ?

3. Right Justify Screen Font?

4. Report Form - Left and Right Justify

5. Right justify column in ListBox

6. numeric field, making commas static (right justify input)

7. How to right justify a menu bar in VFP6 ?

8. if "" = trim(VAR) vs if trim(VAR) = ""

9. If ""=trim(VAR) vs if trim(VAR)=""

10. Is there a problem with TRIM?

11. Trimming extra returns of a memo field

12. Trimming of carriage returns

 

 
Powered by phpBB® Forum Software