Hi to all,
I have an ASP .Net API ( NOT .NET Core ) web app and I want to connect to my database in web report designer through SQL Data Source in Report interface. My UI is ReactJS.
It works everything, I can save/load reports but I cannot add a valid SQL Data Source.
When I click SQL Data Source it gives me an error:
Error
t is not iterable
I tried to add a connection string in my Web.Config file
connectionString="Data Source=<MY PRIVATE CONNECTION STRING>"
providerName="System.Data.SqlClient"/>
But it doesn't work.
My code is
public class ReportDesignerController : ReportDesignerControllerBase
{
static ReportServiceConfiguration configurationInstance;
static ReportDesignerServiceConfiguration designerConfigurationInstance;
static ReportDesignerController()
{
//This is the folder that contains the report definitions
//In this case this is the Reports folder
var appPath = HttpContext.Current.Server.MapPath("~/");
var reportsPath = Path.Combine(appPath, "Reports");
//Add report source resolver for trdx/trdp report definitions,
//then add resolver for class report definitions as fallback resolver;
//finally create the resolver and use it in the ReportServiceConfiguration instance.
var resolver = new UriReportSourceResolver(reportsPath);
//Setup the ReportServiceConfiguration
configurationInstance = new ReportServiceConfiguration
{
HostAppId = "Html5App",
Storage = new FileStorage(),
ReportSourceResolver = resolver,
ReportSharingTimeout = 1000,
ClientSessionTimeout = 20,
};
designerConfigurationInstance = new ReportDesignerServiceConfiguration
{
DefinitionStorage = new FileDefinitionStorage(reportsPath),
SettingsStorage = new FileSettingsStorage(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Telerik Reporting"))
};
}
public ReportDesignerController()
{
//Initialize the service configuration
this.ReportServiceConfiguration = configurationInstance;
this.ReportDesignerServiceConfiguration = designerConfigurationInstance;
}
}