We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Report Designer ASP.net Core Datasources

Thread ID:

Created:

Updated:

Platform:

Replies:

146186 Jul 24,2019 01:52 PM UTC Jul 26,2019 10:34 AM UTC Report Platform 5
loading
Tags: Report Designer
Yoab Youssoufou
Asked On July 24, 2019 01:52 PM UTC

Hello, I've been able to reproduce your report designer in asp.net core, When it is time to add a dataset, the only option I have is to select a SQL dataset for SQLServer, I am using a PostgreSQL database for this project, how can I create a PostgreSQL dataset? attached is my interfcae. 

Attachment: reportdesigner_90509184.7z

Vinoth Srinivasan [Syncfusion]
Replied On July 25, 2019 07:16 AM UTC

Hi Yoab, 
 
Thanks for your interest in Syncfusion components. 
 
We have SQL datasource only in ASP.NET Core Report Designer application, but we can able to connect the custom datasource using external data extensions like custom data extension. We have prepared ASP.NET Core Report Designer sample with PostGreSql datasource option and it can be downloaded from below location. 
 
We have prepared ASP.NET Core PostGreSql datasource extension sample and it can be downloaded from below location. 
 
Please find the below steps to add the PostGreSql DataExtension sample in our WebReportDesigner sample. 
 
Step1: Add the PostGreSql Extension project reference to our Web ReportDesigner sample as shown in below snap: 
 
   
 
Step2: Add the Configuration section in AppConfig file as shown in below code example. 
 
App.config 
<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
  <configSections> 
    <section name="ReportingExtensions" type="Syncfusion.Reporting.Extensions.Configuration.Extensions, Syncfusion.Reporting.Web" allowLocation="true" allowDefinition="Everywhere" /> 
  </configSections> 
 
  <ReportingExtensions> 
    <DataExtension> 
      <Extension Name="PostgreSQL" Assembly="Syncfusion.Reporting.DataExtensions.PostgreSQL" Type="Syncfusion.Reporting.DataExtensions.PostgreSQL.PostgreSQLDataExtension"/> 
    </DataExtension> 
  </ReportingExtensions> 
</configuration> 
 
 
Step3: Add ReportDataExtensions in Report Designer control as shown in below code example. 
 
Please find the below step how to specify the PostGreSql in ASP.NET Core Report Designer application using ViewBag. 
 
Index.cshtml: 
<sf-report-designer id="reportdesigner1" create="controlInitialized" service-url="../Home" report-data-extensions="@ViewBag.ReportDataExtensions"> 
 
</sf-report-designer> 
<sf-script-manager></sf-script-manager> 
 
 
HomeController.cs: 
  public ActionResult Index() 
        { 
            ViewBag.ReportDataExtensions = new List<ReportDataExtensionsModule>(); 
            var ReportDataExtension = new ReportDataExtensionsModule(); 
            ReportDataExtension.Name = "PostgreSQL"; 
            ReportDataExtension.ClassName = "PSQLDataSource"; 
            ReportDataExtension.ImageClass = "e-reportdesigner-datasource-psql"; 
            ReportDataExtension.DisplayName = "PostgreSQL"; 
            ViewBag.ReportDataExtensions.Add(ReportDataExtension); 
            return View();        } 
 
 
Output snap: 
 
 
 
Regards, 
Vinoth S. 


Yoab Youssoufou
Replied On July 25, 2019 11:44 AM UTC

Thank you for this example, but please I have tried all sorts of connection strign and keep getting an error. I ran your example and entered connection string as shown in attachment with or without authentication I keep getting samne error. This is the connection string that works fine in my ASP.net Core wepplication

Attachment: PostgresConnectionString_efcf7799.7z

Vinoth Srinivasan [Syncfusion]
Replied On July 26, 2019 07:07 AM UTC

Hi Yoab, 

Thanks for your update. 

If you are passing the username and password within connectionstring then, could you please choose the Authentication type as None as shown in below snap. 

 

Else if you are specifying connectionstring without username and password then choose the Authentication type as Authentication and pass the username and password as shown in below snap. 

 

Regards, 
Vinoth S. 


Yoab Youssoufou
Replied On July 26, 2019 10:03 AM UTC

Hello,
Thanks It's fine now

Mahendran Shanmugam [Syncfusion]
Replied On July 26, 2019 10:34 AM UTC

Hi Yoab, 

Thanks for your update. 

We were happy to hear from you the issue was resolved. 

Regards, 
Mahendran S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon