Hi,
We want to setup cheque printing from NAV. Experts please advise.
Thanks
*This post is locked for comments
Check the PaperSize property of the Report
Check the form configured for the pri<a href="http://goo.gl/dn5kTX">n</a>ter in Windows. Check both, Extended, Defaults and General, Settings.
Use a pristine .zup
Make sure the printer uses the printer driver supplied by the printer vendor for your exact printer model
Please refer below blog : tharangac-dynamicsnav.blogspot.com/.../cheque-printing-in-dynamics-nav.html
Plus in order to learn Development of Dynamics NAV you can use few published books available in the packtpub.com
Hi,
You need to select your newly created menu in Payment Journal Screen> click View > C/AL Code (F9) to write the following code.
GenJnlLine.RESET;
GenJnlLine.COPY(Rec);
GenJnlLine.SETRANGE("Journal Template Name","Journal Template Name");
GenJnlLine.SETRANGE("Journal Batch Name","Journal Batch Name");
REPORT.RUNMODAL(33020829,TRUE,FALSE,GenJnlLine);
CODEUNIT.RUN(CODEUNIT::"Adjust Gen. Journal Balance",Rec);
Dear Vishal Sir,
The report has already made by the name Cheque printing.
For reference I am attaching screenshots for report report design and layout
Below is the code written. Please advise. Thanks for your support.
BearerName := '';
IF BankAccount.GET("Bank Account Ledger Entry"."Bank Account No.") THEN BEGIN
BankName:=BankAccount.Name;
END;
Dayint:= DATE2DMY("Bank Account Ledger Entry"."Posting Date",1);
Monthint:=DATE2DMY("Bank Account Ledger Entry"."Posting Date",2);
Yearint:=DATE2DMY("Bank Account Ledger Entry"."Posting Date",3);
IF Dayint <=9 THEN
Daytext:='0'+FORMAT(Dayint)
ELSE
Daytext:=FORMAT(Dayint);
IF Monthint<=9 THEN
Monthtext:= '0'+FORMAT(Monthint)
ELSE
Monthtext:=FORMAT(Monthint);
yeartext:=FORMAT(Yearint);
Text1:=COPYSTR(Daytext,1,1);
Text2:=COPYSTR(Daytext,2,1);
month1:=COPYSTR(Monthtext,1,1);
month2:=COPYSTR(Monthtext,2,1);
year1:=COPYSTR(yeartext,1,1);
year2:=COPYSTR(yeartext,2,1);
year3:=COPYSTR(yeartext,3,1);
year4:=COPYSTR(yeartext,4,1);
LedgAmount:=ABS("Bank Account Ledger Entry".Amount);
ReportCheck.InitTextVariable;
ReportCheck.FormatNoText(Numbertext,LedgAmount,"Bank Account Ledger Entry"."Currency Code");
// get the bearer name
GLEntry.RESET;
//GLEntry.SETRANGE(GLEntry."Entry No.","Bank Account Ledger Entry"."Entry No.");
GLEntry.SETRANGE(GLEntry."Document No.","Bank Account Ledger Entry"."Document No.");
GLEntry.SETRANGE(GLEntry."Posting Date","Bank Account Ledger Entry"."Posting Date");
//GLEntry.SETFILTER(GLEntry."Source Type",'<>%1',GLEntry."Source Type"::"Bank Account");
IF GLEntry.FINDFIRST THEN BEGIN
REPEAT
{
IF GLEntry."Source Type" = GLEntry."Source Type"::Vendor THEN BEGIN
IF vendor.GET(GLEntry."Source No.") THEN BEGIN
BearerName:=vendor.Name;
END;
END;
IF GLEntry."Source Type" = GLEntry."Source Type"::Customer THEN BEGIN
IF Customer.GET(GLEntry."Source No.") THEN BEGIN
BearerName:=Customer.Name;
END;
END;
}
BearerName := GLEntry."Cheque Favouring To";
UNTIL (GLEntry.NEXT=0) OR (BearerName<>'');
END;
// if bearer name is blank then try to search in employee dimension
{
IF BearerName = '' THEN BEGIN
// SEARCH FOR EMPLOYEE DIMENSION IN THE DIMENSION SET
DimSetEntry.RESET;
IF DimSetEntry.GET("Bank Account Ledger Entry"."Dimension Set ID",'EMPLOYEE') THEN BEGIN
DimSetEntry.CALCFIELDS(DimSetEntry."Dimension Value Name");
BearerName := DimSetEntry."Dimension Value Name";
END;
END;
}
//MESSAGE(BearerName);
You need to select your menu > click View > C/AL Code (F9) to write the code.
Vishal Sir, Menu has been created, Where I need to write code.
Please advise.
Thanks for your help sir,
I have tried but I am not able to get into coding page
Please advise.
Go to Payment Journal Page (ID - 256) > Click View - Actions > Here you will see all the available options.
You can create your own menu and write the code mentioned in my earlier reply.
.
Thanks for your help Vishal,
Actually I do not know how to create menu. I am new in Microsoft NAV at learning stage. please guide me the steps.
Thanks so much.
Mandeep,
Can you please explain more in detail, when you print a check in standard Navision it uses report selections and will print the check it is setup. When you use that function is it is not printing any check or the check it is printing not in the format you are expecting?
There are different check report formats available in standard Navision
Report 10401 (Stub/Stub/Check), Report 10411 (Stub/Check/Stub) , Report 1401 - Check
You just need to setup one of these in the Report Selections - Bank Account.
If you want a different format then you have to do the customization.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156