Tutorial #2: How to Setup .Net Report Builder in your Project
This tutorial explains all the steps of adding .Net Report Builder to your software application. For this tutorial, you must have already signed up and setup your Database information.
Step 1: Open your Project in Visual Studio
For our tutorial, we will setup and use a new MVC Project. So start Visual Studio, and click on File -> New -> Project. Next, choose “ASP.Net Web Application”, and name it “ReportProject”. In the next step, choose “MVC” and click “OK”.
Step 2: Add NuGet Package
Once your new Project is ready, right click on “References” and choose “Manage NuGet Packages”.
Search for and install package “dotnetreport”.
The NuGet package will add several files to your project, including DotNetReportController and it’s Views.
Step 3: Enter your API Keys from .Net Report Builder
Once it is installed, open up your web.config file, and you will see the following appSettings:
<add key=”dotNetReport.accountApiToken” value=”Your Public Account Api Token” />
<add key=”dotNetReport.dataconnectApiToken” value=”Your Data Connect Api Token” />
<add key=”dotNetReport.privateApiToken” value=”Your Private Account Api Token” />
Login to your account in https://dotnetreport.com and click on “Get Api Keys”. Locate your keys and copy and paste them in to your web.config file.
That’s pretty much it. Build and run your application by pressing “CTRL+F5”. Type /dotnetreport to navigate to the Report Builder.
If you want to change the format or wordings, just open up the view files and make any necessary changes.
You can also see the above tutorial in action in the following video: