Media Objects

salim_premji

Member
Hi,

Would anyone out there know of a good method in which we can determine the number of lines to be printed from a media object.

Example Text:
"This <CR>
is <CR>
a <CR>
media object example text. <CR>"

Ideally, If my UBE display output is 60 Characters long, I should have 4 lines. The problem we are facing is that if we take the length of the text and divide by 60, we get incorrect results for the number of lines due to carriage returns.

Thanks.
 
Hi Salim,

First of all, you are welcome on the JDEList Forum.

What about to count the <CR> characters in the media object, scanning with substring function from position 0 to "length - 1"?

Regards,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Thanks for the welcome and the response Zoltan.

We will write a business function which will return the number of lines based on passed parameters of The media text, length of display output, and a variable to accept the return value (number of lines).

Thanks,
TTFN.

JDE B7333 SP15 AS/400 V4R3 DB2 UDB
 
Hi Salim,

Thanks for the update. Just one more thought.
I do not know that this could be a real issue for you but who knows.
Maybe could cause problems to determine the number of lines when you print it out with proportional fonts instead of with fixed length fonts.

Here is an example:
===================
1.) You print out the text with 60 character length.
2.) You use proportinal fonts.
3.) Maybe the line will wrap after 30 "M" character while will wrap after 90 "l" character.

Briefly, you can not determine the number of lines based on counts of characters when you use proportional font.

I really do not know how do OneWorld handles this issue, so will be appreciated if you will do a little experiment and share the results with us.

Good luck,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Zoltán,

You will be happy(maybe) to know that at the moment OneWorld wraps
after n characters, where n is the display length of the variable
field that is used to show the media object. The font doesn't
come in to play, as I have found from experimentation.

-Seg
 
Re: RE: Media Objects

Lin,
On an assignment statement, use the concat button
and concatenate the media oject text variable and an
enter character (Just press enter for the second
parameter of the concat statement.) That will load a
return cahracter for you.

Hope this helps
Yathindra
XE Update 4 AS/400 Win 2000

--- EYMLIN <[email protected]> wrote:
http://www.jdelist.com/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=28690


=====
Yathindra
One World XE SP 13
Win NT AS/400

__________________________________________________
 
Back
Top