cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict printing of a page in Smartform based on a condition.

Former Member
0 Kudos

Hi all,

I have a requirement where in I need to Print a page in Smartform only when one condition is true. Could anybody suggest me how to do this?

Thanks in advance.

Regards,

Adapala M.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If u r using multiple pages then..

suppose u have 3 pages and u want to print 2nd pages according to ur conditions.

then u can use command in last of 1st page.

In General Attributes tab specify 2nd page

In Conditions tab give ur condition to go to 2nd page.

reply back if u not get.

Regards,

Ankur

Former Member
0 Kudos

Hi Ankur,

Could u give me an example as how to do it exactly? I have put the condition in the last page and set start page to the required page. But its not working.

Regards,

AdapalaM.

Former Member
0 Kudos

Hi Adapala

Try Giving the condition in conditions tab of the page

revert if any issues

if you want i can help you by giving screenshots......

Former Member
0 Kudos

Hi Adapala,

Can u plz tell me ur exact requirement.

means how many pages u have

and in which page u want to give condition so that it will move to the specified page.

in which page u have defined a main window.

Regards,

Ankur

Former Member
0 Kudos

Hi Ankur,

I have the first page where all the PO header data and item data will be printed. Next page if the items extend beyond the first page. These 2 pages have main window.

Then the third page which has terms and conditions. This does not have any main window.

After this I need to print another page(fourth) for acknowledgement. This should get printed based on a condition. Even this page does not have any Main Window.

This is my requirement.

Former Member
0 Kudos

Hi Adapala,

In that case u can create a command (rightclick>create>flowlogic-->command) at the extreme last of 3rd page.

Now in its General Attributes, in Go To New Page = %PAGE4 (select a page 4).ok

and in its conditions tab,put ur condition u want (so that it will go to PAGE4 if condition satisfied).

I hope this will solve ur problem.

Regards,

Ankur

Former Member
0 Kudos

Hi,

There comes the issue. As there is no Main Window in the Third page as I mentioned earlier, if I give the command and assign new page as the required page, an error comes up which says, ''No New Page allowed in Secondary Window'. I am struck at this point.

Regards.

Former Member
0 Kudos

ok..in that case u have to define ur main window in Page 3.

because in SMARTFORMS:

U can define main window only once.

U can use command only in a page having Main Window.

shift ur main window to page 3.

this solves ur problem.

Former Member
0 Kudos

Hi,

Later releases have removed the main window limit. Depending on your release you may be able to use a second main window for your Page3 and Page4.

Regards,

Nick

Former Member
0 Kudos

Hi Adapala,

In new versions u can define Main Window more than once.

Change ur window in 3rd page from secondary window to Main Window,then u can define command.

Hoping for ur solution.

Regards,

Ankur

Former Member
0 Kudos

Hi Nick,

U r right.

Thanks,

0 Kudos

HI ANKUR,

      

I HAVE FOLLOWED YOUR ADVICE ,BUT UNABLE TO FIND THE CORRECT WAY HOW TO WRITE THE CONDITION .

PLZ  GIVE THE EXAMPLE .

I HAVE REQUIREMENT LIKE HAVING THREE PAGES , I ST PAGE  SHOULD PRINT EVERY TIME AND SECOND AND THIRD PAGES SHOULD PRINT BASED ON CONDITION

LIKE    IF CONDITION 1

             PAGE 2.

          ELSE

           PAGE 3.

PLZ  HELP.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi all,

Thanks for your suggestions.

I have copied the Main Window in the third page also and set a condition where if the page is the third page and my condition, then go to page 4. This worked.

Thanks once again to you all.

Regards,

AdapalaM

I355602
Advisor
Advisor
0 Kudos

Hi,

Say if you have three pages,

You want to print page 1 and page 2 and page 3 needs to printed based on a condition.

So design page 1 and in its general attributes take next page as page 2.

Similarly for page 2 take next page as page 2 only.

And at last of the all the elements used in page 2 to print the data, include a command line by right click --> create --> flow logic --> command and specify in the general attributes next page as page 3 and in the condition tab specify the condition to move to the next page.

If the condition is meet, then page 3 will be used else page 3 will not be include in the output.

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Former Member
0 Kudos

Hi,

I dont have a Main window in the 2nd page to keep a condition in that. It says, 'No New Page allowed in Secondary Window'.

The 2nd page consists of only secondary windows which prints the terms and conditions.

Former Member
0 Kudos

Hi adapala

Hey u cant create a page in window

u can create window in page

and u can give conditions for a secondary window also

give me mail id so that i can send u screenshots

regards

Vikas C

Former Member
0 Kudos

Hi Adapala

Can you specify which condition you want to specify

Former Member
0 Kudos

Hi,

I am not creating a page in a Window. I want to navigate to the next page only if a certain condition is satisfied. Else, it shouldnt go to that page. The page from which the navigation should take place does not have a Main Window. Hence I am getting tat error message.

Regards.

Former Member
0 Kudos

If you want to go to nxt page only if some condition is satisfied

give that condition in conditions tab of all the contents of that page

Hope it helps

Revert back if any clarification is reqd

Former Member
0 Kudos

u cant put a condition on page directly so create a command node with condition and then call ur page.

кu03B1ятu03B9к

Former Member
0 Kudos

create a command node as the last element of the page which will come prevous to ur page for which u want condition then specify ur codition on command node and then call ur page thru that command node