web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Getting blank page and void cheque after AP cheque printing...

(0) ShareShare
ReportReport
Posted on by 75

Hi ,

 I am generating cheque for vendor payment. Every time i am getting a blank page after cheque and a void cheque with next cheque no.

Please let me know if there is any way to stop this void cheque and blank page.

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Steven De Ridder Profile Picture
    on at

    Hi Akshay.

    In my experience, a blank page is usually the result of a mismatch between the size of your report design and the actual page size.

    Try playing with your report design (shrinking it a little bit where possible).

    Does this have any result?

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    look at papas size in report with Visualstudio.

    incase of adapted, be sure the blocks are not overlapping

  • Verified answer
    Hemant Jain Profile Picture
    25 on at

    Hi Akshay,

    It was because of the slip lines were not fitting on a single cheque page, and slip lines were rolling over to the next cheque page and printing it void. It was an error which Microsoft had left over for every versions including Ax 7.

    To get rid of this, you need to program CustVendCheque class. First check total number of lines in slip lines, and a boolean method to check overflow based upon your cheque setting and number of slip copies, and print only those slip lines which fits in a cheque page, and rest in remittance advise.

    This is the only solution, and hope this helps.

     Do let me know if you need any further.

    Thanks,

    Hemant Jain

  • Akshay_P Profile Picture
    75 on at

    Thanks to all for reply,

    Thanks Hemant ,

    I have restricted next cheque no. generation from CustVendCheque class but in design void cheque was still displaying.

    i just made that invisible conditionally on design level. now it working fine.

  • Cnu Profile Picture
    10 on at

    Hi Akshay

    How you restricted next cheque no. Can you plz let me know

  • Evan Adamson Profile Picture
    105 on at

    Hi Hemant,

    I understand the concept of what you're explaining but how does one calculate how many lines are too many based on the height and starting position of the cheque layout? Also can you clarify what you mean by "...print only what fits in a cheque page, and the rest in the remittance advise".

  • Suggested answer
    Evan Adamson Profile Picture
    105 on at

    We figured it out! There is a section of code in the CustVendCheque class, method output that prints notes on the check from the LedgerJournalTrans record. This code also creates a blank void check if the notes run on to a second page. We don't use the notes so we just commented out the whole section of code. No more extra blank void checks! Below is section of code we commented out.

    if (notesLines <= endLines - 1)

                   {

                       tmpChequePrintout.SlipTxt += strFmt('\n%1', ledgerJournalTrans.PaymentNotes);

                       endLines -= notesLines;

                   }

                   else

                   {

                       while (endLines >1)

                       {

                           tmpChequePrintout.SlipTxt += '\n';

                           endLines --;

                       }

                       tmpChequePrintout.insert();

                       this.clear();

                       endLines = slipLines;

                       //Printing Payment notes but the payment notes won't fit on one check, spread it out to several checks

                       paymentNotesList = Global::strSplit(ledgerJournalTrans.PaymentNotes,'\n');

                       notesLines = paymentNotesList.elements();

                       le = paymentNotesList.getEnumerator();

                       while (notesLines > 0)

                       {

                           this.initTmpChequePrintout(ledgerJournalTrans.AccountType,

                                                      address,

                                                      location,

                                                      vendTable,

                                                      custTable,

                                                      bankAccountTableCurrent,

                                                      ledgerJournalTrans.BankNegInstRecipientName,

                                                      ledgerJournalTrans.ledgerJournalTable().RecId,

                                                      bankChequeLayout.ChequeFormType,

                                                      false,

                                                      false);

                           this.setBlankCheque(ledgerJournalTrans);

                           tmpChequePrintout.ChequeNum = chequeNum;

                           tmpChequePrintout.Void      = NoYes::Yes;

                           tmpChequePrintout.AccountId = accountId;

                           tmpChequePrintout.TransDate = ledgerJournalTrans.TransDate;

                           tmpChequePrintout.MaturityDate = this.getMaturityDate(custVendPDCRegister.MaturityDate, ledgerJournalTrans.TransDate);

                           paymentNotesHeaderLinesPrinted = 0;

                           switch (bankChequeLayout.ChequeFormType)

                           {

                               case ChequeFormType::USStyle :

                                   tmpChequePrintout.SlipTxt = strFmt("@SYS22495"+' '+slipChequeNum+'\n\n');

                                   paymentNotesHeaderLinesPrinted =2;

                                   endLines -= 2;

                                   break;

                               case ChequeFormType::ESStyle :

                                   tmpChequePrintout.SlipTxt = strFmt("@SYS22495"+' '+slipChequeNum+'\n\n');

                                   paymentNotesHeaderLinesPrinted =2;

                                   endLines -= 2;

                                   break;

                           }

                           for (i = 0; i < slipLines - paymentNotesHeaderLinesPrinted; i++)

                           {

                               le.moveNext();

                               paymentNotesLine = le.current();

                               if (endLines == 1)

                               {

                                   tmpChequePrintout.SlipTxt += paymentNotesLine;

                               }

                               else

                               {

                                   tmpChequePrintout.SlipTxt += paymentNotesLine + '\n';

                               }

                               notesLines --;

                               endLines -= 1;

                               if (notesLines <=0 || endLines == 0)

                               {

                                   break;

                               }

                           }

                           while (endLines >1)

                           {

                               tmpChequePrintout.SlipTxt += '\n';

                               endLines --;

                           }

                           if (endLines == 0 && notesLines > 0)

                           {

                               endLines = slipLines;

                           }

                           tmpChequePrintout.insert();

                           tmpChequePrintout.SlipTxt = '';

                           if (notesLines <= 0)

                           {

                               return;

                           }

                       } //while notesLines

                   }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans