Introduction:
I've observed that when NAV is used for a very long time, the report which needs heavy processing takes long enough to cause Session Time-out. So, fetching reports becomes tedious by manually querying the table.
Pre-requisites:
Microsoft Dynamics NAV
Microsoft Dynamics Business Central
Solution:
The solution is simple, export the Report as an Excel or PDF depending on the data and send Email to the User as an attachment after the processing is complete.
Code:
1. Create the Report in Excel Using Excel Buffer.
2. Export the Excel Buffer contents to an XLSX file.
3. Email the Exported Files to appropriate User. In this case, I have hard coded the user email to my email.
Output:
Conclusion:
Thus adding a piece of code to send email to the User, can save a lot of hassle. In Business Central, however, it is not possible to modify an existing report. So, you need to export the existing report and merge it in AL using Text-To-Al.
I've observed that when NAV is used for a very long time, the report which needs heavy processing takes long enough to cause Session Time-out. So, fetching reports becomes tedious by manually querying the table.
Pre-requisites:
Microsoft Dynamics NAV
Microsoft Dynamics Business Central
Solution:
The solution is simple, export the Report as an Excel or PDF depending on the data and send Email to the User as an attachment after the processing is complete.
Code:
1. Create the Report in Excel Using Excel Buffer.
2. Export the Excel Buffer contents to an XLSX file.
3. Email the Exported Files to appropriate User. In this case, I have hard coded the user email to my email.
Output:
Exporting Progress of Excel Worksheet |
Exported Intermediate file to be emailed |
Email received after the report is completely exported. |
Conclusion:
Thus adding a piece of code to send email to the User, can save a lot of hassle. In Business Central, however, it is not possible to modify an existing report. So, you need to export the existing report and merge it in AL using Text-To-Al.
Comments
Post a Comment
Let me know your comments below. I'll try my best to answer your comment