?
Solved

Line spacing on dynamic tables

Posted on 2000-03-12
8
Medium Priority
?
195 Views
Last Modified: 2013-12-18
Greetings, experts!

Is there a way to align items on a dynamic table without using Lotus Script?

I created a dynamic table with two (2) columns.  One column is for Item Number, the other is for Description.  When the Description column exceeds the allowed space, it wraps to the next line.  Thus, the row corresponding to the Item Number is not aligned.

Example: Not aligned
ITEM NO    DESCRIPTION
03-12345  Box of goodies from Aunt Maggie that contains blah blah blah.....
03-67890  ...........  blah blah blah (end of 03-12345 Description)
                 Box of old personal effects from the Ice Age.

Ideal: Aligned
ITEM NO    DESCRIPTION
03-12345  Box of goodies from Aunt Maggie that contains .......
                 ...............  blah blah blah (end of 03-12345 Description)
03-67890  Box of old personal effects from the Ice Age.


Add'l info:  I'm developing in version 4.6.2.
0
Comment
Question by:KidLance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 2

Expert Comment

by:Paebdb
ID: 2611594
As far as I know there is no way to prevend this, as you are just appending lines to a rtf, right ?
The only idea I have is to work with the string of the description.
If the size of the description is longer than the line, append a new line with
the number of chars the item number has added by the rest of the description.

In pseudocode:

if desc <= maxDesc
    Append itemNr+desc
else
    Append itemNr+maxDesc(desc)
    Append length(itemNr) * " "+restOfDesc
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 2611705
Well,

I am forced to do this kinda job most of the time which i dont like.  I give a solution in a different way,

I truncate the value of the field to a specific length so that the extra characters does not wrap.

Also, i create a formula popup hotspot around the field and give it a formula so that when the user clicks on the content then the whole description pops up to read in full length.

The hotspot formula will refrence to a hidden field.
the actual Field will also referece to the hidden field with an @Left function.

Hope this might help....

Good  Luck !!!

-Arun
0
 
LVL 2

Expert Comment

by:Paebdb
ID: 2611711
Thats a nice idea !
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:KidLance
ID: 2614802
Thanks!  I appreciate your responses.  Your ideas are workable.  However, I have to stick with the problem I have.

Please allow me to elaborate. (Sorry if I left this detail out the first time.)  I'm working on two fields named ItemNo and Desc.  Both are computed text fields with New Line as text display separator.  To place values into these fields, I have ItemNox and Descx w/c are both editable text fields.  Once a button (named Add) is clicked, whatever values ItemNox and Descx have goes (appended) to ItemNo and Desc, respectively.  For as long as the user adds items, ItemNo and Desc "grows".


Paedbdb, your suggestion is OK for one or two lines of description.  However, I have to work on descriptions that go 4 to 5 lines.*

Arun, I need one solution that must always show the full description on the document form without using hotspots.*

I hope you two expert won't tire of my problem and continue to assist me.  For the other experts out there, please do pitch in.
= = = = = = = = = =
* Isn't it incredible what users sometimes demand from developers???
0
 
LVL 2

Expert Comment

by:Paebdb
ID: 2615051
Still you can use my idea.
Check the length of the string first
Length(string) Div MaxLength = NumberofLines +1
 Now fill a structure, i.e. and array, run a loop and append more or less like I said before.

Ok, it's complicated, but it should be possible.
0
 

Accepted Solution

by:
DaddyDawg earned 225 total points
ID: 2620796
Some more suggestions:
First, make sure that your two "column" fields are using a monospace font, such as Courier.  Why? because the characters of a monospace font are all the same size - therfore you can determine exactly how many characters are on each line.

Next, I would use @Length to determine how long the description entry is. Divide this number by the number of characters/line allowed (I would reduce this number by a few to allow for words not fitting - so if the line allows 25 characters, I would use 20). This will tell you how many "pads" you need in your first column.  Now, when you add a new value to the first column, the formula would be:

YOURENTRY : @Repeat(@NewLine + "--"; (@Length(description)/charsperline))

So, if the description were 85 characters, and your allowed chars/line was 20, the value added to the first column would be:

SomeEntry
--
--
--
--

You use the dashes to hold the spots open.  Many times new lines and spaces are trimmed from fields, so this preserves the space.

Rock
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2626514
Hi Kidlance

Users are always demanding, and they are like hammer which shapes up the iron and makes sharp, just a comment.

Ok I have already done this kind of application and it works similar to what u have asked for...

The idea behind this is same as the one DaddyDawg described. Except for in the First column you can add space, unless u don't trim the field there is no problem, hope DaddyDawg agrees with that.

PS: The spacing in the input dialog and that on the host form should be manipulated so that it fits the screen properly, still there would be problems when user resizes the notes window. Anyway on the print it looks pretty good.


Good Luck
~Hemanth

0
 

Author Comment

by:KidLance
ID: 2665994
Seems that DaddyDawg's answered the nearest solution.  Thanks a lot!

To the others who contributed, I wish I could share a number of points for each one of you - the time and effort you gave to assist me is highly appreciated.

And Hemanth, you were right about the user being "the hammer that shapes the iron, making it sharp" ... but allow me to add:

"They are hammers that has the power to shape iron - to make it sharp or make it shapeless."
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question