Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Main window not getting displayed on all pages in smartforms

Former Member
0 Kudos

Hello,

I have been developing this smartform that requires to restrict number of lines from main window(main area) to 10 line items.

Below are the methods I already tried:

Number1:

In the loop of the internal table , goto the calculation tab.

In that select the operation as 'Number' and time as 'Before loop' and give the variable name in the target field.

Create a command inside the loop.Check for the condition that if the value of the variable is equal to 10 and if the condition is true then trigger a new page.

For each new page, clear the variable.

Main window displays but the lines from the main area over flow and the footer does not display on the first page.

Number2:

Restricted the number of internal table entries to 10.Then called new page when a var count = 10.

When the next page is called the internal table is filled with left over entries but main window does not

display.All the other windows display except main window.

Please help.

Thanks.

12 REPLIES 12

naimesh_patel
Active Contributor
0 Kudos

Why can't adjust the height of your Main window?

Say 11 LN.

I assume that you have 1 line for the Header and 10 lines for the data (1 data record per 1 row).

Regards,

Naimesh Patel

0 Kudos

Thanks for your answer.

Maybe the last option would be that but isn't there a technical way to handle this ? That s wat we should be looking at.

0 Kudos

Its pure techanical and simple way to restrict the number for lines if you want FIX number of LINES in your main window.

It will not work if your data record expand in more than one row.

For that you need to :

1. Declare global variable say W_COUNT

2. In the MAIN > TABLE > HEADER add a new program lines to clear the W_COUNT

3. In the MAIN > TABLE > MAIN > ROW > CELL1 add a new program lines to increment the W_COUNT

4. In the MAIN > TABLE > MAIN add a new COMMAND node.

In the command, give Go to New Page and select the same page

In the Condition tab of the Command, give the condition W_COUNT = 10

Regards,

Naimesh Patel

0 Kudos

There would definitely be multiple lines because we are trying to print about 200 characters on a dot matrix printer which allows 122 characters only.

I have already tried the logic that you just mentioned but wasn't fruitful.Any more new ideas?

Former Member
0 Kudos

Hello,

Try to use the template.. with 10 rows as per your requirement...

and use this same template on every page with different records.

Thanks.

0 Kudos

Thanks for your answer.

The requirement is to use a table because the footer needs to trigger as soon as the mian area is over i.e. either it could be centre of the form or the end of the page.In case of template this cannot happen as it isn't dynamic.The layout has been provided by Govt. of India so even the layout cannot be adjusted,thereby table has to be used.

Former Member
0 Kudos

Instead of, from my point of view you can try

select * up to 10 rows ............. Query

0 Kudos

I am sorry din't catch that.Can you elaborate?

Thanks.

0 Kudos

HI Shami,

I think u can restrict it in two ways that is create one template in dat create 10 rows.Use that template in every page.

Or

u can restrict it using select <data> from <table> into table itab upto 10 rows.

I thjink u can do it.

Try once.

Regards,

Farook.

Edited by: farook shaik on Nov 27, 2008 5:40 AM

0 Kudos

Farook,

If you refer the point number 2 in my query.I already have tried looping only 10 line items per page.In fact the internal table also gets filled second time but the main window does not display/trigger.All other windows display in the second page.

Anyaways thanks for your answer.

0 Kudos

Hi Shami,

Once u display the internal table for the first time Plz clear and refresh it.

I think u can get the solution now. and put a break point at the main window and debug it.

Just look at ur code whether u have forgotten to write the append statement to aapend all ur records to main window.

Regards,

Farook.

Edited by: farook shaik on Nov 27, 2008 6:23 AM

0 Kudos

Farook,

I have refreshed the internal table before filling it once again.Only the standard code executes after it reaches main window;it is not so easy to debug that.Requires lots of patience and time which I hardly have.

Anyways thanks.