2 Replies Latest reply: May 14, 2014 1:11 PM by User9976634-Oracle RSS

    Print .pdf always, .ps conditionally

    user13484277

      Hi All,

       

      I have a requirement of printing .pdf for all transactions always, but .ps for only few of those transactions which has <printpst> tag as 'Y'. How to configure. I created two different batches one for pdf and one for ps, but how to exclude ps batch at runtime based on an xml tag? I tried cloning the the pdf forms and assign different recipient for ps, it works partially that subforms wont print in ps (it occupies space but no data is printed for subforms).

       

      Any help is much appreciated.

       

      Thanks

        • 1. Re: Print .pdf always, .ps conditionally
          user13484277

          I figured out the subform not printing part...please help me on the dynamic .ps part

           

          Thanks

          • 2. Re: Print .pdf always, .ps conditionally
            User9976634-Oracle

            The answer will vary (at least slightly) depending upon exactly how you are calling for print. Are you talking about EE DocFactory printing? Or are you talking about GenData with or without using the PrintFormset rule?

             

            For standard edition Gendata you may be able to accomplish what you want using the "BatchingByRecipINI" rule.

             

            I don't know what batching rule you are currently using, but in this case you would replace whatever you currently have with this one rule.

             

            <Base Form Set Rules>

            ....

            ;BatchingByRecipINI;2;;

            ....

             

            Note, I'm not trying to show you all your rules. I'm only showing that you add this rule to the Base Form Set Rules section of the Afgjob.jdt file.

             

            This rule utilizes INI options where you can specify a search mask or other criteria that can be queried to determine your batching. In your case, if you only have two batches and the situation is as simple as you describe, it might only require this.

            < BatchingByRecip >

            Batch_Recip_Def = !//printpst=Y;"Batch1";ALL

            Batch_Recip_Def = TRUE;"Batch2";ALL

             

            The way I understand this, it begins at the top and considers each Batch_Recip_Def in sequence until it finds one that is true. In this case, set the first one to test your node for the right value. The second semicolon names the batch name associated with your ps print (in this case). The final value identifies recipients. ALL is a special case that says to match all recipients.  Assuming your transaction does not have the necessary tag, then the second Batch_Recip_Def will be queried. In this case it is hard-coded to assume TRUE and ALL recipients again, so every transaction that doesn't meet the first condition should fall into this one.

             

            Substitute your own batch names that point to the necessary print type and that's about it.