Tutorial – 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”.
[Best_Wordpress_Gallery id=”2″ gal_title=”Tutorial 2 Add Project”]
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.
[Best_Wordpress_Gallery id=”3″ gal_title=”Tutorial 2 Nuget Package”]
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.
[Best_Wordpress_Gallery id=”4″ gal_title=”Tutorial 2 Done”]
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: