How to configure PostgreSQL Data Processing Extension for Report Designer
This section explains the steps required to register and load PostgreSQL data extensions in Web Report Designer application.
Install PostgreSQL data source extension NuGet
To register and load PostgreSQL data sources in the application install BoldReports.Data.PostgreSQL package in the application.
Right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages. Alternatively, select the Tools > NuGet Package Manager > Manage NuGet Packages for Solution menu command.
Search for BoldReports.Data.PostgreSQL NuGet package, and install it in your application.
To register the extension in the ASP.NET Web application, follow the below steps.
Open the code-behind file
Global.asax.csand add the following using statement.using BoldReports.Web;Then register the assembly name
BoldReports.Data.PostgreSQLin Application_Start usingReportConfig.DefaultSettingsas follows to use the PostgreSQL data extension.protected void Application_Start(object sender, EventArgs e) { System.Web.Http.GlobalConfiguration.Configuration.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional }); AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true); //Use the below code to register extensions assembly into report designer ReportConfig.DefaultSettings = new ReportSettings().RegisterExtensions(new List<string> { "BoldReports.Data.PostgreSQL" }); }
ASP.NET Core
To register the extension in the ASP.NET Core application, follow the below steps.
Open the file
Startup.csand add the following using statement.using BoldReports.Web;Then register the package name
BoldReports.Data.PostgreSQLin Startup as follows usingReportConfig.DefaultSettingsas follows to use the PostgreSQL data extension.public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true); //Use the below code to register extensions assembly into report designer ReportConfig.DefaultSettings = new ReportSettings().RegisterExtensions(new List<string> { "BoldReports.Data.PostgreSQL" }); }
To register multiple data extensions in the application, provide the assembly name's as list of strings.