Packing Slip reports with two designs

Hi Experts,

I have two report designs for packing slip which prints one after the other after packing slip is posted

I want Note Type to display on Report design of Packing slip and Cert to display on CERT Report design

Here is what i hvae done so far

  • Declared boolean isCert in SalesPackingSlipDP class decleration
  • In process report method

if(objContract.parmDocumentTitle() == literalStr("@SYS11549"))

    {

        isCert = false;

    }

    else

    {

        isCert = True;

    }

  • In SetSalesPackingSlipDetailsTmp method

   if ((custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::Line)

             || (custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::All))

            {

                If(isCert)

                {

                    docuRefSearch = DocuRefSearch::newTypeIdAndRestriction(custPackingSlipTrans,"CERT",DocuRestriction::External);

                    salesPackingSlipTmp.Notes                   = Docu::concatDocuRefNotes(docuRefSearch);

                }

                else

               {

                    docuRefSearch = DocuRefSearch::newTypeIdAndRestriction(custPackingSlipTrans,custFormletterDocument.DocuTypePackingSlip,DocuRestriction::External);

                    salesPackingSlipTmp.Notes                   = Docu::concatDocuRefNotes(docuRefSearch);

                }

            }

The issue is output displays certification type notes in both reports and unable to switch between designs in code

Debugged few times but was unable to get an idea where the designs are switching

Kindly advice

Parents
  • Can you please share what you found during debugging?

    For example, maybe your code doesn't work as expected. Maybe it sets Notes but the field is than overwritten by some other code. Maybe the value in the form doesn't come from Notes. Or something else. You must identify the problem before you can fix it.

Reply Children
Related
Recommended