cancel
Showing results for 
Search instead for 
Did you mean: 

hide a page

former_member216702
Active Participant
0 Kudos

Hello,

in Adobe LiveCycle Designer --> ABAP

Is it possible to hide / unhide a page if a condition is passed in the context ?

Thank you

Thierry

Edited by: Thierry on Nov 6, 2009 2:27 PM

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Did you set your form to be dynamicin zour ABAP coding? To hide a page it needs to be dynamic. set DYNAMIC = 'X'.

former_member216702
Active Participant
0 Kudos

It is ok with the parameter dynamic.

Thank you very much.

Thierry

0 Kudos

Hi,

Can You give one example of how to set this form as dynamic in ABAP coding. This will be helpful.

Thanks & Regards,

Runesh.

former_member216702
Active Participant
0 Kudos

Hello Runesh,

In your abap code, when you use the function to call your form (gerated function), put the parameter dynamic = 'X' in /1bcdwb/docparams

Ex :

CALL FUNCTION 'FP_FUCNTION_MODULE_NAME'

EXPORTING

i_name= 'your form'

IMPORTING

e_funcname = wv_fname.

wv_docparams-dynamic = 'X'

CALL FUNCTION wv_fname

EXPORTING

/1bcdwb/docparams = wv_docparams

...

regards,

Thierry

Answers (4)

Answers (4)

sunil_mani
Active Participant

You can hide the master page depending on any condition you have. But there is one clean rule. If your master page doesn't want to get printed then content area of that master page should not contain any data. It means even if you hide all the data in the content area, your whole master page ( including its instances i.e overflown pages) will be hidden.

For that you have to create a text field in your layout and drag and drop it in the content area of the master page which you want to hide. The text field acts like a flag whether or not to hide the master page. If 'X' then hide. Else do not hide. The value of the flag field will be decided while coding in the interface itself based on your condition. Then wrap the data of the content area including your flag field in a sub form. Do not forget to hide the flag field after wrapping it in the sub form because you don't want to show this on the page if that page is displayed by any chance.

Finally click on the whole wrapped sub form. Write below Form calc script in events Initialization, Form Ready and Layout Ready.

Here the HIDEPAGE_FLAG is nothing but your flag field.

if ( $.HIDEPAGE_FLAG == "X" ) then

$.presence = "hidden"

endif

This code hides your whole sub form . It means there will be no data shown in the content area and the Adobe framework doesn't print that specific master page(and all its instances). 🙂


OttoGold
Active Contributor
0 Kudos

You need to check the following:

- the main subform has object - content set to "flowed"

- you have not changed the pagination, there is "following previous" option used

- there are no margins that would interfere (tab layout)

- you set the presence (visibility) to "hidden"), not "invisible"

that should be enough.

former_member216702
Active Participant
0 Kudos

Hello,

I check all that values.

My subform is hidden but I have a blank page when my PDF is generated.

If I click on the PDF preview tab in the designer, it's ok.

Thierry

OttoGold
Active Contributor
0 Kudos

You need to use the script editor. Open under Windows - Script editor, or using Ctrl, Shift, F5.

In the scipt editor you need to place the code (as a friend wrote earlier), choose the proper language (javascript or formcalc), choose the event to run the code and it will work for you.

You dont need to upgrade but i can recommend doing this immediately. Every version of the Adobe product is more stable and works faster. Check SAP notes about the LCD 8.0, that is suffiscient.

Hope this helps, O.

former_member216702
Active Participant
0 Kudos

Hello,

I m not yet to the result...

Now, i have a white page and the the number of page is incremented.

If the second is hidden, I dont want the increment number... Is it possible ?

Thierry

Former Member
0 Kudos

Hi thierry,

You will be able to do this with Javascript / formcalc and based on a condition from the context.

In the script area of a template page, you can add this script :

if ($.record. == ) then

{

$.presence = "hidden";

}

former_member216702
Active Participant
0 Kudos

Hello Brice,

It seems not possible to put a script on a page.

Thierry

Former Member
0 Kudos

Hello Thierry,

Its possible to hide a page, the script would not be active for Master Page(Page) however you can alwayes write script on Body page(or Design view for designer 8.0). The body page itself is a subform and you can use the event form:ready.

write your script as suggested above.

Thanks and regards,

Priyanka

former_member216702
Active Participant
0 Kudos

Hello Priyanka

I m in liveCycle Designer 7.1

Therefore is not possible in that version and I must upgrade my designer ?

Thierry