Administration > Application Setup > Job Queue
Use the Job Queue.
Administration > Application Setup > Job Queue
Put a call to your report into a codeunit and save as HTML.
The codeunit could then generate and send an email. You could either stream the report html output into the email or attach the HTML file to the Email.
This codeunit could be executed by the Job Queue.
Hope this helps,
Willy
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
Put a call to your report into a codeunit and save as HTML.
The codeunit could then generate and send an email. You could either stream the report html output into the email or attach the HTML file to the Email.
it really is pretty easy here is some code that I created to email an error log after an automated sales post batch :
//Send the log to Accounting:
tsSMTPSetup.GET;
SMTPMail.CreateMessage(tsSMTPSetup."Accounting Name",
tsSMTPSetup."Accounting email address",
tsSMTPSetup."Accounting email address",
'Sales Invoice Batch Log','',TRUE);
tsLog.RESET;
tsLog.SETRANGE(Date,TODAY);
IF tsLog.FINDSET THEN BEGIN
tsLogReport.SETTABLEVIEW(tsLog);
tsLogReport.SAVEASHTML('c:\SalesBatchLog.HTML');
tsfile.TEXTMODE(TRUE);
IF tsfile.OPEN('c:\SalesBatchLog.HTML') THEN BEGIN
tsfile.SEEK(0);
REPEAT
tsfile.READ(tsErrorText);
SMTPMail.AppendBody(tsErrorText);
UNTIL tsfile.POS = tsfile.LEN;
END;
SMTPMail.Send;
tsfile.CLOSE;
ERASE('c:\SalesBatchLog.HTML');
END;
I know this is a bad example by hardcoding and using the 'c:\' but that is what the customer wanted.
Regards,
Willy
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
Comments
Administration > Application Setup > Job Queue
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Denis Petrov.
Put a call to your report into a codeunit and save as HTML.
The codeunit could then generate and send an email. You could either stream the report html output into the email or attach the HTML file to the Email.
This codeunit could be executed by the Job Queue.
Hope this helps,
Willy
would you please share the exact code
thanks
Denis Petrov.
it really is pretty easy here is some code that I created to email an error log after an automated sales post batch :
I know this is a bad example by hardcoding and using the 'c:\' but that is what the customer wanted.
Regards,
Willy