cancel
Showing results for 
Search instead for 
Did you mean: 

Truncating Data Output in SMARTFORM main window

Former Member
0 Kudos

Hi,

I have a requirement that i will only show 5 lines from a certain table in my smartforms, currently its required to be in the main table because of spacing issue and the possibility that there will be no data from the table.

My problem is that even though my my table only contains 5 lines..it can/will display 6 or more lines because if the data does not fit the form in 1 page the smartform default will put it in the next line...

for example in my table:

1 ABCDE

2 WWWWWWWWWWWWWWWWWWWWWWWW

3 QWERTYUP

4 ASDFG

5 AQSWDEFR

display:

ABCDE

WWWWWWWWWWWW

WWWWWWWWWWWW

QWERTYUP

ASDFG

AQSWDEFR -


> this should have been truncated

How will I know that i'm using 6 lines already.... or how can i use the width of my main window to know when to truncate the data

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Its not truncation but a word wrap feature in the smartform. You should adjust the width of the window/table so as to allow the number of characters you require in a line.

Regards

Karthik D

Former Member
0 Kudos

hi i'm using a main window..i know the width but its defaulted that if the 'word' in the variable does not fit the width in main window it will create new line...so i cant determine the exact line im using

Former Member
0 Kudos

Hi,

I didn't get your requirement. If you want to ensure that no truncation should happen you should check and modify the internal table beforehand.

Regards

Karthik D

Former Member
0 Kudos

Hi,

the basic requirement is for me is to display only 5 lines in smartform mainwindow.

so for example now i have 5 lines in my internal to be display in my main window:

Values:

line 1: AAAAAAAAAAAAAAAAAAAA

line 2: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

line 3: BBBBBBBBBBBBBBBBBBBB

line 4: NNNNNNNNNNNNNNNNNN

line 5: CCCCCCCCCCCCCCCC

in this sample the line 2 will occupy 2 lines in my smartform main window, so i need to disregard the line 5 and dont display it,, my problem is that how will I know prior or during my display that the line 2 will occupy 2 lines...

Thanks a lot, hope you can help me with this or give me idea for the approach

Former Member
0 Kudos

Hi,

First you have to find out the number of character your main window can hold in a single line. then before displaying add a program lines element and in that check the length of each line of the internal table and delete the extra lines.

I hope you can get your requirement using the above approach...

By the way is that a Z smartform?

Regards

Karthik D

Former Member
0 Kudos

Thanks Karthik D,

Ive used that approach, i count the maximum number of char in my line using largest letter 'W' (its 85), so i create an internal table with 85 char each row, the problem that exist is that they said that i didnt maximize the whole space the window can handle.

because when i display all W:

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

WWWWWWWWWWWWWWWWWWWWWWW

- it will use all spaces in 1st line before creating next

but when i use letters like I:

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII

- it will have another line without maximizing the space in the 1st line...

*could there be a possible FM that will determine the width i will cover using font style/ number of char....

Thanks..

Edited by: Alvin Rosales on Jun 1, 2009 10:22 AM

Former Member
0 Kudos

Can you use a non-proportional font like Courier? Then your output will always occupy the same amount of space regardless of which letter you use.