cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying issue in smarform

Former Member
0 Kudos

Hi Experts,

I have a problem in smartforms. I want to display only two fields in the output. Assume that first field is F1 and second field is F2. F1 field vaule may be any number of lines i mean it may be 1 line or 10 lines it is not sure depends on the data. It is dynamic value.In the same way field F2 is also dynamic but for sure the output will be a single word for example it may be "yes" or "no".

Case 1) I have created a text for these two fields and in the text editor i have written it as

&F1&,,&F2&

Now in this case what's happening is, suppose field F1 output is assume as 3 lines. As i said field F2 value is single word "yes" or "no".

Now in the output it is appearing as after lines a tab space is coming and the value "yes" or "no" is displaying. The output looks like this.

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "YES"

Case 2) I have taken a template and given two colums with width and height.As i said F1 field is dynamic either it may contain 1 line or 10 lines. But the helight will be fixed for the fields in the template. Suppose if the output is 100 lines then the height may not sufficient. So what i want is dynamic height field, based on the data it should expand or contrast.

Suppose if the height is given as 1 cm and the output contains some 10 lines. But in the height of 1 cm only two lines will come. The output looks like this.

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "YES"

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

other 8 lines are not displaying due to height problem.

What i exactly need is dynamic height field which can accommodate any number of lines.

suppose if the first field value is 3 lines then the output should like this.

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "YES"

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

always second field F2 should display beside first line of F1 not the the end of last line like case 1.

suppose if the first field F1 value is 2 lines then the output should look like this.

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "NO"

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

HOW TO ACHIEVE THIS IN SMARTFORM, IS THERE ANY PROPERTY LIKE AUTOFIT AVAILABLE IN SMARFORM FOR TEMPLATES.

Please suggest some solutions. Your help will be greatly appreciated.

Regards,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

former_member673464
Active Contributor
0 Kudos

hi,

you can use the table or loop in main window for displaying the data for first field and you have to place the second field in secondary window .

Regards,

Veeresh

Answers (6)

Answers (6)

Former Member
0 Kudos

another approach would be to:

- read your variable F1 (i guess its a text)

- read F2

- read line 1 of F1, and concatenate F2 to it

- modify F1

- save F1 as a standard text using FM SAVE_TEXT and FM COMMIT_TEXT

- in Smartform print your new text.

Former Member
0 Kudos

Hi Venkatesh,

It is simple there is no autofit, but you can achieve by using

1.styles and character format (right align, left align,...)

2.create a template or table make two columns or rows as per your requirement and again do the alignment with your style.

3.If you question again if blank then if you create template it take care about the if any text blank.If you create text without template put condition in the text to control blank.

4.And also you have page protection option if overflows it shifts to next line or next page.

Hope this will helps..

Thanks,

Hari

former_member673464
Active Contributor
0 Kudos

hi,

I hope there is no such thing as auto fit in smartforms.You have two options only. 1. displaying data in fixed length

2. Displaying the data in the main window.

Regards,

Veeresh

Former Member
0 Kudos

Hi Venkatesh,

Create a main window for field F1 and a secondary window for field F2. Adjust your windows such that the secondary window is beside the main window. Then you will be able to get field F2 beside field F1.

And if you need field F2 only at the end of first line then adjust your secondary window to accomaodate only one line.

Former Member
0 Kudos

Hi,

I understand you get that kind of output with using tabs.

It is better to create a template with two columns. Then you get exactly what you want.

Succes.

Gr., Frank.

ps. do not type that long lines in your thread. I had to scroll my windows form left to right several times.

Former Member
0 Kudos

Sorry,

a little mistyping

Hi,

I understand you get that kind of output with using tabs.

It is better to create a TABLE with two columns. Then you get exactly what you want.

A table is dynamically in height.. I expands itselfs in height.

Succes.

Gr., Frank.

ps. do not type that long lines in your thread. I had to scroll my windows form left to right several times

Former Member
0 Kudos

Veeresh thanx for the input. But is there any property like auto fit for a particular field.

Former Member
0 Kudos

No, u dont have any variable for defining the height dynamiacally ,

and also there isn't any property like auto fit for a particular field.

So u can have a template ahaving one row and 2 columns, in this case the row can expand upto, height of template but not beyond that, so give max heinght as possible,or u can use table node inside main window, so tht it flows to next page if space is not sufficient.

кu03B1ятu03B9к