cancel
Showing results for 
Search instead for 
Did you mean: 

no balnk window in smartform

Former Member
0 Kudos

Hi,

I have created a window with height of 4 lines.

and iam printing four lines of data

lets assume

line1 = 'A'

line2 = 'B'

line3 = 'C'

line4 = 'D'

when there is no data in line2 then it is printing as

A

C

D.

which is correct.as iam checking for NE space for each line

but my requirement is when i dont have any data in line1 , line2, line3 , line4.

then any blank space shouldn't be printed.but iam getting blank space equivalient to size of window. can some tell me how to avoid displying this blank window space? how can we dynamically shrink or expand the window based on the data?

Accepted Solutions (1)

Accepted Solutions (1)

arul_murugan
Active Participant
0 Kudos

hi

dont create three windows create one window and give all the details in the first window.

if you want to display like this

text1

text2

text3

text4

use alternate condition with in the window

for example

create four alternate condition

In first alternate condition

give text1 not equal to ' ' in general attributes

if it is true

give &text1& in text node

In second alternate condition

give text2 not equal to ' ' in general attributes

if it is true

give &text2& in text node

In third alternate condition

give text3 not equal to ' ' in general attributes

if it is true

give &text3& in text node

In fourth alternate condition

give text4 not equal to ' ' in general attributes

if it is true

give &text4& in text node.

For every text you have to create one text node . dont give any thing in false condition

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi

If you have 3 windows, windows dont move up when there is no data.

Window positions are fixed, as you have designed...

Regards,

Raj

Former Member
0 Kudos

Hi

Set a flag to 'X' when all the contents of Line 1, Line 2, Line 3 and Line 4 are blank.

Use this flag as condition. i.e flag <> 'X' for the window in condition tab.

Regards,

Raj

Former Member
0 Kudos

Hi,

Lets assume in my smartform i have three secondary windows.

window1

wondow2

window3.

if there is no data at all in the wondow2 then window3 should movde up to the postion of window2. in my case this is not happening . instead its showing window2 as blankplace and then below it , it is showing window3.

Former Member
0 Kudos

Hi,

Why don’t you remove the height given to window? if there is no specified height it will display the contents flexibly.

I am not sure of this, just check out once.

Message was edited by:

Seemanthini R

Former Member
0 Kudos

Hi U can give condition for the window.(last tab)

may be it will help.

-


SAKR

Former Member
0 Kudos

Hi,

I have given condition in the window also .

let me explain my isue again.

in a window iam printing line1 , line2 line3.

i check for each line NE space.

so when i give the condition it will print only those lines which has data.

which is ok.

but when none of the lines have any data then i dont want to print any blank window.

as i created a window of size 3 LN.

now when there is no data its showing a space equivalent to 3 lines.

even when if i give condition in the window . it is showing blank spaces.

can you write a test program and check it .

Former Member
0 Kudos

Hi,

write conditions as given in previous posts, then give a flag like this :

g_flag = space. "Set first

if line1 is not initial.
"print line1.
g_flag ='X'.
endif.

if line2 is not initial.
"print line2.
g_flag ='X'.
endif.

"so on...

if g_flag eq 'X'.
call function 'WRITE_FORM'
.
.
Window =window_name.

endif.

Hope this logic will solve ur prob.

Jogdand M B

former_member196280
Active Contributor
0 Kudos

Example

If line initial.

print 'Blank'.

Elseif.

Print line.

Endif.

Reward points to all useful answers.

Regards,

SaiRam

former_member196280
Active Contributor
0 Kudos

Example

If line initial.

print 'Blank'.

Elseif.

Print line.

Endif.

Reward points to all useful answers.

Regards,

SaiRam

Former Member
0 Kudos

Hi,

as u are ckeching for each line then use :

if linE1 IS NOT INITIAL and <other condition>.

"print line

endif.

This will remove balnk lines

Jogdand M B

Former Member
0 Kudos

Hi,

I tried all the ways . i think this is a limitation in the smartform.

Former Member
0 Kudos

hi neha,

try to avoid borders to address window , then it solves...

regards,

seshu.

Former Member
0 Kudos

Hi,

Iam not using any border for the window.

Thanks,

Neha