cancel
Showing results for 
Search instead for 
Did you mean: 

Empty page is being printed but shouldn't be

0 Kudos

Hello all,

I'm new with Adobe Forms and would like receive your help to see the light at the end of

the tunnel.

Business wants to print a couple of forms: Delivery Note (DN) and Return Delivery Note (RDN). They are triggered from a shipment. From the shipment, the DN is being getting and then from DN a RDN could be printed or not, maybe DN doesn't have a RDN. Just DN should be sent by email, not RDN. So, I decided to have four master pages: two for DN (FirstPage and NextPage) and two others for RDN (FirstPageRDN and NextPageRDN).


My problem is that even the last page from RDN is empty, it is being printed and this is not okay. I have read that for adobe forms, When the content area contains a main subform and if this main subform is hidden (i.e. no data left to show), the adobe framework hides the master page and all its instancesbut it doesn’t work. Perhaps I need to include something else or coding something with FormCalc.

And my other issue —that I think is related with the same thing— is that the RDN form should not be printed if we don’t have items (items or information statement on main) but it does and this is not okay either. I think that’s why it’s being sent as well by email and business doesn’t need it, they just want the DN.

I'll really appreciate your suggestions to solve boths issues.


Thanks a lot.

Fab

Accepted Solutions (1)

Accepted Solutions (1)

pavan_prabhu
Active Participant
0 Kudos

Hello Carmen,

When the content area contains a main subform and if this main subform is hidden (i.e. no data left to show), the adobe framework hides the master page and all its instances

     Please follow my last answer in the below thread.

http://scn.sap.com/thread/3225419

Though the thread is unanswered, it works fine. . I have stressed this many times in my other previous posts also.

You should always hide the master page by hiding the main sub form programmatically in the design view(body page) of that master page. Now it totally depends on the design.


I won't go much into the design level. I hope you have created 2 different master pages for DN and two for RDN because when the data is overflowed in each case the layout changes.


But If layout is same through out, no need of second master page. According to your design, I assume the layout is changing.

1) DN

Now there are 2 cases:

Case 1: If the content area of these two master pages of DN are linked with each other(e.g in case of overflow) and if there are no items to be overflown to next page, then the second master page is not called automatically. Framework takes care of this.

Case 2: If the content area of these two master pages are not linked with each other, then each master page is called irrespective of data present or not. In such scenario, you have to explicitly hide the master page through Java script.

I think you are into Case 2. Send a variable(basically a flag which should be set in the Interface itself). For example, if there are no data items, set this flag to 'X'.

Now use this flag in the layout (i.e drag it in the main sub form in the design view content area) through data view and just hide the flag field. Write the code in Java script as shown below on the main sub form in design view. Make sure the flag field is binded.

if ( this.flag.rawvalue == " " )

{

      this.presence = "hidden";

}

Here basically you are checking whether the flag is blank or not. If blank, then hide that main sub form. If this main sub form is hidden, content area will be empty and the whole master page(and its instances) will be hidden. Make sure the

2) RDN

Repeat the same steps as shown above for design view of 2nd master page of RDN also. It will solve your issue.

Note: If all the 4 master pages are not all linked with each other, then send separate flags to each of them and hide the master pages

0 Kudos

Hi Pavan,

Thanks a lot for your fast answer.

I followed all your steps but it didn't work to me

One of my colleagues suggested me to create separate forms, so if I don't have data for the second one, it won't be triggered. I will try this and I will let you know if works.

Thanks again.

Answers (2)

Answers (2)

navip
Active Participant
0 Kudos

Hi Loya,

Hope you have Wrapped the RDN page in a subform, if yes then follow the below FormCalc:

if ($.parent.RDN == null) then

$.presence = "hidden"

else

$.presence = "visible"

endif

---

Naveen

Former Member
0 Kudos

Hello Fabiola,

If you want to hide a page just use a script, you may use Form Calc or Javascript.

Here is the presence property you should use :

LiveCycle ES2 * Adobe LiveCycle Designer ES2

But you should add a condition like if my content is empty mypage.presence = 'hidden'

They have an example of dunning notice :

LiveCycle ES2 * Adobe LiveCycle Designer ES2

In fact adobe form are linked to adobe live cycle, most of the thing working for live cylce goes for adobe form.

Best Regards

Abdou

0 Kudos

Thanks Abdou for your info.