Wordwrap on forms 
Author Message
 Wordwrap on forms

I am using SQL 4.10.

I have a char(80) column in a table which is represented on a form with
two 40 character fields using the wordwrap attribute:

       [This is my sample of the eighty         ]
       [character field with word wrap.         ]

When I select this column via a report, I get:

     This is my sample of the eighty        character field with word wrap.

I don't want the database to store these extra spaces created by the word
wrapping on the form. Reports look real ugly when printing out like this.

Any way around this?

Thanks,
Carl Mosley
AT&T



Sun, 07 Aug 1994 05:03:21 GMT
 Wordwrap on forms

Quote:

>I am using SQL 4.10.

>I have a char(80) column in a table which is represented on a form with
>two 40 character fields using the wordwrap attribute:

>       [This is my sample of the eighty         ]
>       [character field with word wrap.         ]

>When I select this column via a report, I get:

>     This is my sample of the eighty        character field with word wrap.

>I don't want the database to store these extra spaces created by the word
>wrapping on the form. Reports look real ugly when printing out like this.

>Any way around this?

Yes and no.

You can't really get around the storage of the spaces since you're entering
data like this:

[This is my sample of the eighty     ][character field with word wrap.       ]

and shoving it into the same column.  It's just doing what you're telling it
to.

The "yes" part of the answer is more encouraging.

Since your form splits up the 80 character column the same way for every user,
you can take advantage of that in your report.  Let's say you do the following
in your form:

f000 = tabname.col1[1,40];
f001 = tabname.col1[41,80];

In your report you could print it out the same way:

ON EVERY ROW
   PRINT col1[1,40] CLIPPED
   PRINT col1[41,80] CLIPPED

This will make the report look just the way the user typed it in.



Mon, 08 Aug 1994 05:20:10 GMT
 Wordwrap on forms

Quote:

>ON EVERY ROW
>   PRINT col1[1,40] CLIPPED
>   PRINT col1[41,80] CLIPPED

>This will make the report look just the way the user typed it in.

or, of course:

Quote:
>ON EVERY ROW
>   PRINT col1[1,40] CLIPPED;
>   PRINT col1[41,80] CLIPPED

to put the output on a single 80-column line.
--

                 UNIX(tm): The biggest computer virus of all



Tue, 09 Aug 1994 01:48:20 GMT
 Wordwrap on forms

Quote:

>or, of course:

>>ON EVERY ROW
>>   PRINT col1[1,40] CLIPPED;
>>   PRINT col1[41,80] CLIPPED

>to put the output on a single 80-column line.
>--

Actually, what you really want to do is:

ON EVERY ROW
   PRINT col1[1,40] CLIPPED, " ";
   PRINT col1[41,80] CLIPPED

Otherwise you get "Something that looks like this with wordsrunning together"

Gary Pratt
AT&T Executive Human Resources
(908) 221-7047
attmail: !gpratt
att!cbnewsl!gpratt



Wed, 10 Aug 1994 00:41:12 GMT
 Wordwrap on forms
|> I am using SQL 4.10.
|>
|> I have a char(80) column in a table which is represented on a form with
|> two 40 character fields using the wordwrap attribute:
|>
|>        [This is my sample of the eighty         ]
|>        [character field with word wrap.         ]
|>
|> When I select this column via a report, I get:
|>
|>      This is my sample of the eighty        character field with word wrap.
|>
|> I don't want the database to store these extra spaces created by the word
|> wrapping on the form. Reports look real ugly when printing out like this.
|>
|> Any way around this?
No other follow-ups mentioned this, so I thought I'd contribute my $.02,
to wit:
          [f003                                    ]
          [f003                                    ]

f003 = table.field, WORDWRAP COMPRESS;

in the screen form file will strip out the input blanks, and (I think)
eliminate the gaps when you output with report.
|>
|> Thanks,
|> Carl Mosley
|> AT&T

--
The opinions expressed herein are my own, and do not necessarily express
those of my employer.
   John Caywood, System Administrator and Computer Janitor
   UNISYS Corp., under contract to Technical Editing Branch,
   NASA Langley Research Center



Wed, 10 Aug 1994 03:33:09 GMT
 Wordwrap on forms

Quote:

> Actually, what you really want to do is:

> ON EVERY ROW
>    PRINT col1[1,40] CLIPPED, " ";
>    PRINT col1[41,80] CLIPPED

> Otherwise you get "Something that looks like this with wordsrunning together"

Actually what that will give you most of the time is lines with
more  than  one  space  between them.  Just my $.02 :-)

DAS
--

                                                               is db4glgen-3.4



Wed, 10 Aug 1994 10:26:27 GMT
 Wordwrap on forms

Quote:

>I have a char(80) column in a table which is represented on a form with
>two 40 character fields using the wordwrap attribute:

>       [This is my sample of the eighty         ]
>       [character field with word wrap.         ]

>When I select this column via a report, I get:

>     This is my sample of the eighty        character field with word wrap.

Wordwrap by itself will store the trailing blanks at the end of each line,
as you have experienced. By using the attribute "wordwrap compressed" (no
comma delimiter between "wordwrap" and "compressed"), those blanks will be
compressed out.
  ___                   ___              Consultant, Client Srvcs Engineering
  /  ) __      . __/    /_ ) _       __  Informix Software Inc. (303) 850-0210
_/__/ (_(_ (/ / (_(_  _/__> (-' -/~ (_-  5299 DTC Blvd #740 Englewood CO 80111
--
  ___                   ___              Consultant, Client Srvcs Engineering
  /  ) __      . __/    /_ ) _       __  Informix Software Inc. (303) 850-0210
_/__/ (_(_ (/ / (_(_  _/__> (-' -/~ (_-  5299 DTC Blvd #740 Englewood CO 80111
{uunet|pyramid}!infmx!dberg       The opinions expressed herein are mine alone.


Tue, 09 Aug 1994 10:25:34 GMT
 Wordwrap on forms

Quote:


}>
}>ON EVERY ROW
}>   PRINT col1[1,40] CLIPPED
}>   PRINT col1[41,80] CLIPPED
}>
}>This will make the report look just the way the user typed it in.
}
}or, of course:
}
}>ON EVERY ROW
}>   PRINT col1[1,40] CLIPPED;
}>   PRINT col1[41,80] CLIPPED
}>
}to put the output on a single 80-column line.

Actually, that would just create the same problem that the original poster
was complaining about.  Remember there is nothing but spaces from, say,
col1[27] to col1[41].


Sat, 13 Aug 1994 11:07:38 GMT
 Wordwrap on forms

Quote:
>}>ON EVERY ROW
>}>   PRINT col1[1,40] CLIPPED;
>}>   PRINT col1[41,80] CLIPPED
>}>
>}to put the output on a single 80-column line.

>Actually, that would just create the same problem that the original poster
>was complaining about.  Remember there is nothing but spaces from, say,
>col1[27] to col1[41].

Remember that CLIPPED removes them. But two words would run together, though,
as somebody else pointed out.

--

                 UNIX(tm): The biggest computer virus of all



Mon, 15 Aug 1994 05:58:38 GMT
 
 [ 9 post ] 

 Relevant Pages 

1. FourGen Forms: WORDWRAP attribute

2. DBGrid Wordwrap

3. DBGrid WordWrap

4. Searching component.TDBGrid with WordWrap?

5. wordwrap construct

6. Wordwrap Attribute

7. Quickreport WordWrap Not Working !

8. Quick Report TQRLabel and Wordwrapping

9. A problem with wordwrap

10. WORDWRAP [COMPRESS]

11. "WordWrap" and temporary string storage

12. "WordWrap" and temporary string storage


 
Powered by phpBB® Forum Software