Format trouble on character field

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

Format trouble on character field

Post by FRED_EMMERICH_(Guest) » Tue Aug 28, 2001 10:51 am

I am reading a character field from a .dbf file that has embedded carriage returns in it. The application that created the .dbf put them in there and I have no control over it. What I am trying to do is split each of those lines (contained in that character field) into separate lines on my report, center justified. Is there a way to do this with formatting? The center justify is not tunred on in my menus for this field. Best I can get so far is 3 lines left justified and the CR shows as a square at the end of the line.____Thanks,

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Format trouble on character field

Post by kfleming » Tue Aug 28, 2001 3:23 pm

Create a calculated field with the expression:____strrep(fieldx,chr(13),";")____format the field as word wrapped and in Format Record Layout check the box that says begin new line on semicolon.______Kathleen__R&R Support

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Format trouble on character field

Post by FRED_EMMERICH_(Guest) » Tue Aug 28, 2001 3:30 pm

I did as you suggested and I formatted my character field where I replaced the CR with a ;. Now I get a blank line with each of the 3 lines that are created. Also, I can^t get the new field to center justify, that option is grayed out.____Thanks

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Format trouble on character field

Post by kfleming » Wed Aug 29, 2001 11:53 am

Try using:____strrep(fieldx,chr(13),"")____and see if the blank lines disappear.____I can think of no circumstance that would have the center alignment choice greyed out for a character calculated.____Kathleen__R&R Support

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Format trouble on character field

Post by FRED_EMMERICH_(Guest) » Thu Aug 30, 2001 9:00 am

Center align is grayed out when word wrap is turned on.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=====> RE: Format trouble on character field

Post by kfleming » Thu Aug 30, 2001 12:41 pm

Right click on the field, choose properties and select Justify.____I just did notice that the Center icon does grey out.______Kathleen__R&R Support

FRED_EMMERICH_(Guest)
Posts: 170
Joined: Tue Oct 10, 2017 12:44 pm

======> RE: Format trouble on character field

Post by FRED_EMMERICH_(Guest) » Thu Aug 30, 2001 1:42 pm

I ended up splitting the original character field into 3 separate fields and the center formatting worked okay.

Post Reply