RE: How to set the month filter?
Dear Sir,
currently I am using the below code but there is no result:
IF WORKDATE=CALCDATE('<CM>',TODAY) THEN BEGIN
PdfDocPath :='MKUShyamNagarLedgerDetails.pdf';
Path := 'C:\Temp\'+PdfDocPath; // Directory + Path
CLEAR(MKUShyamNagarLedgerDetails); // MKUShyamNagarLedgerDetails is a Report 50088
MKUShyamNagarLedgerDetails.USEREQUESTPAGE(FALSE); //// for filteration
IF NOT MKUShyamNagarLedgerDetails.SAVEASPDF(Path) THEN
ERROR('PDF Creating Failed!\\ERROR:\\' + GETLASTERRORTEXT);
SMTpMail.CreateMessage('MKU Limited','NAV@mku.com','manish.yadav@mku.com','Ledger Details:','',TRUE);
SMTpMail.AppendBody('Dear Sir / Madam,');
SMTpMail.AppendBody('<br><br>');
SMTpMail.AppendBody('Please Find The Ledger Details in PDF Format:');
SMTpMail.AppendBody('<br><br>');
SMTpMail.AppendBody('Regards');
SMTpMail.AppendBody('<br>');
SMTpMail.AppendBody('MKU Accounts Departments ');
SMTpMail.AddAttachment(Path);
SMTpMail.Send;
ERASE(Path);
END;