microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
773 stars 610 forks source link

How to modify default reports from BC ! #679

Closed TharunMuthu closed 5 years ago

TharunMuthu commented 5 years ago

Hi , I a trying to modify default report(Customer - Detail Trial Bal.) ? can you please guide Note: i have exported the layout using below link but i did not get AL source code ! but i need to add one column in this default report ! bit confusing here ! since one project went live 2 weeks before now customer is pushing us ! can you please guide !!!

https://docs.microsoft.com/en-us/dynamics365/business-central/ui-how-create-custom-report-layout#MakeChangesToLayout

srenders commented 5 years ago

Hi,

As you can clearly read in the documentation, you can not modify the dataset of an existing report! You can change the layout, word and or rdlc, but not the dataset.

To see how you can change the layout, you can have a look at the docs website as mentioned in your post. To have a look at how you can create a new report, have a look here: http://thinkaboutit.be/2017/08/how-do-i-create-a-report-and-layout-in-vscode/

I suggest you export the current report to .al, modify the number, add the field(s) to the dataset and layout(s) and upload it, in an extension, as a new report. Then you use the events, to have it replace the current one...

See also here: Report substitution is possible from extensions: https://blogs.msdn.microsoft.com/nav/2018/08/31/developer-preview-august-2018/

To export an object to AL: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-txt2al-tool

And as a sidenote, I would also suggest to analyse these kinds of requests, before you go live... ;-)

TharunMuthu commented 5 years ago

Hi ,

Thanks for your reply. How do export report to .al ? because in BC-OnCloud there is no development environment !only Client is available !! Requirement: Need to add one extra field in default Customer - Detail Trial Bal. Report but in BC-On premise version yes i know how to export then convert in to .al.!! Because BC-On premise having Development Environment

srenders commented 5 years ago

Your usage of exclamation marks tells me you are probably a bit frustrated. I also find it surprising how you are able to support a customer in an environment you are clearly not really familiar with...

You need to figure out the version of the product your customer is using. You can use the System Information page to do that: http://thinkaboutit.be/2018/09/what-is-my-build-no-in-business-central/ http://www.waldo.be/2018/11/09/system-information-in-microsoft-dynamics-365-business-central/ https://blogs.msdn.microsoft.com/freddyk/2018/12/05/business-central-build-numbers/

Then you need to use either docker or the on premises development environment to export a version of that report to txt and convert it to al. https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/

TharunMuthu commented 5 years ago

Thanks for your detailed explanation .Finally i did !! once again thanks for your valuable reply .Mary Christmas !