Skip to main content

#bcopendiscussion - Dummy Extension for Print Custom Report From Purchase Order.

 Hi Readers,

This article is originated from one of our weekly #bcopendiscussion. This article talks about a concept you can enhance this extension the way you wanted. 

I have two other way that I can handle it, so feel free to add your views in the GitHub repo. 

If you find this useful please thanks  Shahid Ullah.

#bcopendiscussion

The discussion question was - 

I like to replace the existing Purchase Order Report with my Developed Purchase Order Report using the below condition-

I have added a filed Order Type and Value is say 1,2,3

If Order Type 1 then like to call Custom PO report ID-50001

If Order Type 2 then like to call Custom PO report ID-50002

If Order Type 3 then like to call Custom PO report ID-50003

Here is how I thought would be simple extension for it -

1. Add a Field in Purchase Header Table and Purchase order Page.

Using Table Extension add a field & using page extension add field in General Tab.

** Just for Demo I am using SDH Prefix/Suffix.


2. Add a Codeunit To Subscribe Event from Table Report Selection.

Check it is purchase order or not. If its not purchase order then exit otherwise call customize report.

3. Add Reports that you need. 

For Demo I just copied base Microsoft Report and saved in 5000 Numbers.

4. Test Process, Check Purchase order and check with Order Type = ''.

5. Test Process, Check Purchase order and check with Order Type = option2.

If you find this useful, or would like to enhance this please feel free to download / contribute using GitHub repo.

GitHub Link - https://github.com/postsaurav/PurchaseOrderPrinting

If you are still in C/AL please download objects from here. OneDrive Link

Source code is developed using Business Central 14. You can branch out and download symbol to test it. When you will try to download symbol system will generate launch.json.

Let me know your views on same.

Regards,
Saurav Dhyani
https://www.sauravdhyani.com/

Comments

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.