When you need to design a layout for a report, using VSCode, when creating an extension, as you might already know, you have the choice between using Report Builder and Visual Studio. And you can use both of them at the same time, which enables you to combine the advantages of both environments when designing RDLC report layouts.
First you need to download and or install Report Builder and Visual Studio. You can find the prerequisites here:
- Report Builder for SQL Server 2016
- Visual Studio 2017 with Microsoft Rdlc Report Designer for Visual Studio installed.
Normally, Report Builder will already be installed after you install Business Central On Premises. If you are using the cloud version, then of course you might need to download and install it manually.
The installation of Report Builder is very easy, there are no options to select, simply: next next next finish…
Visual Studio needs to be downloaded and installed. You can use the CE: Community Edition, and during installation you don’t need to select everything, the following is enough:
After you download this file, run it. This will start the Visual Studio Installer:
Then the following window opens:
Here you need to select ASP.NET and web development:
You might also want to select some other components, but they are not required for report development. Then select Install or Install while downloading.
This might take a while… and you might be asked to reboot your machine…
After installation, launch Visual Studio:
You will be asked to sign in to your account, or choose to do that later.
Then choose your color theme:
Visual Studio is now started. Let’s open our report layout:
Hmmm, this is not what you expected… Well, important is also that you download the following:
You need this .vsix file installed in Visual Studio 2017, otherwise RDLC layouts will render as XML.
Now, open your report again, and voila:
Now that you have Report Builder and Visual Studio installed, we need to configure.
If you have a file with a file extension .rdl, windows will propose to open it with Report Builder:
Right-click the RDLC file and select Open With:
Select the devenv.exe in this folder: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE
And from now on, .rdlc files will open with Visual Studio:
So by changing the file extension to .rdl or .rdlc you decide which editor to use, and then in VSCode, open externally will use that editor:
Pingback: How Do I : Create a Document Report, and layout, in VSCode? (part2) – think about IT
Thank you, Steven, for these complete instructions on getting RDLC files to open in Visual Studio 2017. I spent many hours doing it wrong, until I read your blog. The key for me was downloading and installing the Microsoft RDLC Report Designer for Visual Studio (vsix installer).
This was really helpful for me as well, Steven. I’m still stuck on the Designer as I’ve installed it but VS still displays as XML. Also, when exporting my file from BC ad rdlc, it doesn’t render as .rdlc but .rdl. Could this be the problem?
The extension .rdl or .rdlc does not matter.
Important is that you download the following:
Microsoft Rdlc Report Designer for Visual Studio:
You need this .vsix file installed in Visual Studio 2017, otherwise RDLC/RDL layouts will render as XML.
How do I compile the rdlc in visual studio? (not visual studio code)
In the past we could build the rdlc inside visual studio in order to detect any issues, e.g. referring to a field that does not exist in the dataset. This functionality seems to be missing in .AL programming. Please advise what is needed to be able to build the rdlc inside visual studio
I have no idea. I don’t think this is possible anymore…