Hi Shweta,
please see what i have done, it will look handy, but a good solution.
First of all make 2 separate pages having a Main window in both, now perform your coding in first page
and make your second page empty.
i means to say that the contents of second page should be in first page itself, when the contents of first page gets ended, then create a command so that it will go on next page.
For first page in general attribute keep next page as PAGE2, and in the command after the commencement for first page keep it also to go to next page (page2).
Just see that all my contents are within my first page, and i have to show its value in second page,
see in my second page mian window, its empty (i have taken all its contents in first page itself)