Skip to content

Commit

Permalink
feature(REPORT-333381): Bold-Reports 5.3 Release Changes(30/10/2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
SundaresanGunasekaran committed Oct 30, 2023
1 parent 1bf59ca commit 86b7196
Show file tree
Hide file tree
Showing 286 changed files with 7,228 additions and 3,526 deletions.
4 changes: 2 additions & 2 deletions Controllers/MetaData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public MetaDataInfo updatePreviewMetaData(dynamic sampleData)
switch ((string)sampleData.basePath)
{
case "ReportViewer":
metaContent = "The ASP.NET Core bold report viewer allows the end-users to visualize the " + title + " report in browsers.";
metaContent = "The ASP.NET Core Bold Report Viewer allows the end-users to visualize the " + title + " report in browsers.";
title += " | Preview | ASP.NET Core Report Viewer";
break;
case "ReportWriter":
title += " | Preview | ASP.NET Core Report Writer";
metaContent = "The ASP.NET Core bold report writer allows the end-users to download the report in browsers without visualizing the report.";
metaContent = "The ASP.NET Core Bold Report Writer allows the end-users to download the report in browsers without visualizing the report.";
break;
default:
title = "";
Expand Down
10 changes: 7 additions & 3 deletions Controllers/ReportDesignerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public IActionResult Index()
ViewBag.isDesigner = true;
ViewBag.toolbarSettings = new BoldReports.Models.ReportDesigner.ToolbarSettings();
ViewBag.toolbarSettings.Items = BoldReports.ReportDesignerEnums.ToolbarItems.All
& ~BoldReports.ReportDesignerEnums.ToolbarItems.Save;
& ~BoldReports.ReportDesignerEnums.ToolbarItems.Save & ~BoldReports.ReportDesignerEnums.ToolbarItems.Open;
ViewBag.permissionSettings = new BoldReports.Models.ReportDesigner.PermissionSettings();
ViewBag.permissionSettings.DataSource = BoldReports.ReportDesignerEnums.Permission.All & ~BoldReports.ReportDesignerEnums.Permission.Create;
this.updateMetaData("RDL");
return View();
}
Expand All @@ -26,7 +28,9 @@ public IActionResult RDLC()
ViewBag.isDesigner = true;
ViewBag.toolbarSettings = new BoldReports.Models.ReportDesigner.ToolbarSettings();
ViewBag.toolbarSettings.Items = BoldReports.ReportDesignerEnums.ToolbarItems.All
& ~BoldReports.ReportDesignerEnums.ToolbarItems.Save;
& ~BoldReports.ReportDesignerEnums.ToolbarItems.Save & ~BoldReports.ReportDesignerEnums.ToolbarItems.Open;
ViewBag.permissionSettings = new BoldReports.Models.ReportDesigner.PermissionSettings();
ViewBag.permissionSettings.DataSource = BoldReports.ReportDesignerEnums.Permission.All & ~BoldReports.ReportDesignerEnums.Permission.Create;
this.updateMetaData("RDLC");
return View("~/Views/RDLC/Index.cshtml");
}
Expand Down Expand Up @@ -74,7 +78,7 @@ public void updateMetaData(string reportType)
public void updateDesignerMetaData(dynamic sampleData)
{
string title = String.IsNullOrEmpty((string)sampleData.metaData.title) ? sampleData.sampleName : sampleData.metaData.title;
string metaContent = "The ASP.NET Core bold report designer allows the end-users to arrange/customize the reports appearance in browsers." +
string metaContent = "The ASP.NET Core Bold Report Designer allows the end-users to arrange/customize the reports appearance in browsers." +
"It helps to edit the " + title + " for customer\"s application needs.";
title += " | ASP.NET Core Report Designer";
ViewBag.Title = title.Length < 45 ? title += " | Bold Reports" : title;
Expand Down
6 changes: 0 additions & 6 deletions Controllers/ReportDesignerWebApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ public void OnInitReportOptions(ReportViewerOptions reportOption)
reportOption.ReportModel.ReportingServer = this.Server;
reportOption.ReportModel.ReportServerUrl = this.ServerURL;
reportOption.ReportModel.ReportServerCredential = new NetworkCredential("Sample", "Passwprd");
if (reportName == "load-large-data.rdlc")
{
Models.SqlQuery.getJson(this._cache);
reportOption.ReportModel.ProcessingMode = ProcessingMode.Remote;
reportOption.ReportModel.DataSources.Add(new ReportDataSource("SalesOrderDetail", _cache.Get("SalesOrderDetail") as DataTable));
}

}

Expand Down
17 changes: 17 additions & 0 deletions Controllers/ReportViewer/SubReportController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace ReportsCoreSamples.Controllers.ReportViewer
{
public class SubReportController : PreviewController
{
public IActionResult Index()
{
this.updateMetaData();
return View();
}
}
}
24 changes: 19 additions & 5 deletions Controllers/ReportViewerWebApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,20 @@ public class ReportViewerWebApiController : Controller, IReportController, IRepo
// IHostingEnvironment used with sample to get the application data from wwwroot.
private IWebHostEnvironment _hostingEnvironment;

internal ExternalServer Server { get; set; }

public string ServerURL { get; set; }

// Post action to process the report from server based json parameters and send the result back to the client.
public ReportViewerWebApiController(Microsoft.Extensions.Caching.Memory.IMemoryCache memoryCache,
IWebHostEnvironment hostingEnvironment)
{
_cache = memoryCache;
_hostingEnvironment = hostingEnvironment;
ExternalServer externalServer = new ExternalServer(_hostingEnvironment);
this.Server = externalServer;
this.ServerURL = "Sample";
externalServer.ReportServerUrl = this.ServerURL;
}

// Post action to process the report from server based json parameters and send the result back to the client.
Expand All @@ -46,16 +54,22 @@ public object PostReportAction([FromBody] Dictionary<string, object> jsonArray)
// Method will be called to initialize the report information to load the report with ReportHelper for processing.
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
reportOption.ReportModel.ReportingServer = this.Server;
reportOption.ReportModel.ReportServerUrl = this.ServerURL;
reportOption.ReportModel.EmbedImageData = true;
string reportName = reportOption.ReportModel.ReportPath;
string basePath = _hostingEnvironment.WebRootPath;
FileStream reportStream = new FileStream(basePath + @"\resources\Report\" + reportOption.ReportModel.ReportPath, FileMode.Open, FileAccess.Read);
reportOption.ReportModel.Stream = reportStream;
if (reportName == "load-large-data.rdlc")
string reportPath = reportOption.ReportModel.ReportPath;
if ((dynamic)reportOption.ReportModel.ReportPath.Split('.').Length <= 1 && reportOption.ReportModel.ProcessingMode.ToString() == "Remote")
{
Models.SqlQuery.getJson(this._cache);
reportOption.ReportModel.DataSources.Add(new BoldReports.Web.ReportDataSource("SalesOrderDetail", this._cache.Get("SalesOrderDetail") as DataTable));
reportPath += ".rdl";
}
else if ((dynamic)reportOption.ReportModel.ReportPath.Split('.').Length <= 1 && reportOption.ReportModel.ProcessingMode.ToString() == "Local")
{
reportPath += ".rdlc";
}
FileStream reportStream = new FileStream(basePath + @"\resources\Report\" + reportPath, FileMode.Open, FileAccess.Read);
reportOption.ReportModel.Stream = reportStream;

}

Expand Down
39 changes: 21 additions & 18 deletions Controllers/ReportWriterController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@

namespace ReportsCoreSamples.Controllers
{

public class ReportWriterController : PreviewController
{
private IWebHostEnvironment _hostingEnvironment;
private IWebHostEnvironment _hostingEnvironment;

public ReportWriterController(IWebHostEnvironment hostingEnvironment)
{
_hostingEnvironment = hostingEnvironment;
}
internal ExternalServer Server { get; set; }
public string ServerURL { get; set; }
public string getName(string name)
{
string[] splittedNames = name.Split('-');
Expand Down Expand Up @@ -46,6 +48,15 @@ public IActionResult generate(string reportName, string type)
string fileName = reportName.Contains("-") ? getName(reportName) : (char.ToUpper(reportName[0]) + reportName.Substring(1));
WriterFormat format;
ReportWriter reportWriter = new ReportWriter();

ExternalServer externalServer = new ExternalServer(_hostingEnvironment);
this.Server = externalServer;
this.ServerURL = "Sample";
externalServer.ReportServerUrl = this.ServerURL;
reportWriter.ReportingServer = this.Server;
reportWriter.ReportServerUrl = this.ServerURL;
reportWriter.ReportServerCredential = System.Net.CredentialCache.DefaultCredentials;

reportWriter.ReportProcessingMode = ProcessingMode.Remote;
reportWriter.ExportResources.UsePhantomJS = true;
reportWriter.ExportResources.PhantomJSPath = basePath + @"\PhantomJS\";
Expand All @@ -55,19 +66,10 @@ public IActionResult generate(string reportName, string type)

reportWriter.ExportResources.Scripts = new List<string>
{
//Gauge component scripts
"../../scripts/bold-reports/common/ej2-base.min.js",
"../../scripts/bold-reports/common/ej2-pdf-export.min.js",
"../../scripts/bold-reports/common/ej2-svg-base.min.js",
"../../scripts/bold-reports/data-visualization/ej2-lineargauge.min.js",
"../../scripts/bold-reports/data-visualization/ej2-circulargauge.min.js",

"../../scripts/bold-reports/common/bold.reports.common.min.js",
"../../scripts/bold-reports/common/bold.reports.widgets.min.js",
//Chart component script
"../../scripts/bold-reports/data-visualization/ej.chart.min.js",
"../../scripts/bold-reports/v2.0/common/bold.reports.common.min.js",
"../../scripts/bold-reports/v2.0/common/bold.reports.widgets.min.js",
//Report Viewer Script
"../../scripts/bold-reports/bold.report-viewer.min.js"
"../../scripts/bold-reports/v2.0/bold.report-viewer.min.js"
};

reportWriter.ExportResources.DependentScripts = new List<string>
Expand All @@ -90,18 +92,19 @@ public IActionResult generate(string reportName, string type)
fileName += ".csv";
format = WriterFormat.CSV;
}
else if (type == "html")
else if (type == "html")
{
fileName += ".html";
format = WriterFormat.HTML;
}
else if (type == "ppt")
else if (type == "ppt")
{
fileName += ".ppt";
format = WriterFormat.PPT;
}
else if(type == "xml"){
fileName +=".xml";
else if (type == "xml")
{
fileName += ".xml";
format = WriterFormat.XML;
}
else
Expand Down
19 changes: 0 additions & 19 deletions Models/SqlQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ namespace ReportsCoreSamples.Models
{
public class SqlQuery
{
public static string getJson(IMemoryCache _cache)
{
if (_cache.Get("SalesOrderDetail") == null)
{
using (SqlConnection connection = new SqlConnection("Data Source=dataplatformdemodata.syncfusion.com;Initial Catalog=AdventureWorks2016;user id=demoreadonly@data-platform-demo;password=N@c)=Y8s*1&dh;"))
{
connection.Open();
string queryString = "SELECT SOD.SalesOrderDetailID, SOD.OrderQty, SOD.UnitPrice,CASE WHEN SOD.UnitPriceDiscount IS NULL THEN 0 ELSE SOD.UnitPriceDiscount END AS UnitPriceDiscount, SOD.LineTotal, SOD.CarrierTrackingNumber, SOD.SalesOrderID, P.Name, P.ProductNumber FROM Sales.SalesOrderDetail SOD INNER JOIN Production.Product P ON SOD.ProductID = P.ProductID INNER JOIN Sales.SalesOrderHeader SOH ON SOD.SalesOrderID = SOH.SalesOrderID";
SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection);
using(DataSet salesOrders = new DataSet()){
adapter.Fill(salesOrders, "Orders");
_cache.Set("SalesOrderDetail", salesOrders.Tables[0]);
connection.Close();
return "[{\"value\":" + JsonConvert.SerializeObject(_cache.Get("SalesOrderDetail")) + ",\"name\": \"SalesOrderDetail\"}]";
}
}
}
return null;
}
public static string getProductCategory(IMemoryCache _cache)
{

Expand Down
Binary file added Nuget/Bold.Licensing.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.AspNet.Core.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Base.Logger.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.CRI.Barcode.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.Csv.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.ElasticSearch.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.Excel.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.MySQL.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.Oracle.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.PostgreSQL.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.SSAS.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Data.WebData.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.JavaScript.5.3.8.nupkg
Binary file not shown.
Binary file added Nuget/BoldReports.Net.Core.5.3.8.nupkg
Binary file not shown.
26 changes: 13 additions & 13 deletions ReportsCoreSamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bold.Licensing" Version="5.2.26" />
<PackageReference Include="BoldReports.AspNet.Core" Version="5.2.26" />
<PackageReference Include="BoldReports.CRI.Barcode" Version="5.2.26" />
<PackageReference Include="BoldReports.Net.Core" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.WebData" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.Csv" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.Excel" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.SSAS" Version="5.2.26" />
<PackageReference Include="Bold.Licensing" Version="5.3.8" />
<PackageReference Include="BoldReports.AspNet.Core" Version="5.3.8" />
<PackageReference Include="BoldReports.CRI.Barcode" Version="5.3.8" />
<PackageReference Include="BoldReports.Net.Core" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.WebData" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.Csv" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.Excel" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.SSAS" Version="5.3.8" />
<PackageReference Include="BuildBundlerMinifier" Version="2.9.406" />
<PackageReference Include="log4net" Version="2.0.10" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="BoldReports.Data.MySQL" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.Oracle" Version="5.2.26" />
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="5.2.26" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="BoldReports.Data.MySQL" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.Oracle" Version="5.3.8" />
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="5.3.8" />
</ItemGroup>
<ItemGroup>
<None Include="Controllers\**" CopyToOutputDirectory="Always" />
Expand Down
2 changes: 1 addition & 1 deletion Views/DynamicChartSeries/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@section description {
<div id="description">
<p>
This demo shows the VisitorsCount, PurchaserCount, AddedToCartCount by dynamically chossing the chart series.
This demo shows the VisitorsCount, PurchaserCount, AddedToCartCount by dynamically choosing the chart series.
</p>
<p>
More information about the Chart report item can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/chart/"
Expand Down
4 changes: 2 additions & 2 deletions Views/DynamicColumns/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
@section description {
<div id="description">
<p>
Dynamic column tabular report demonstrates to change the number of columns at runtime using JavaScript Bold Report Viewer.
Dynamic column tabular report demonstrates to change the number of columns at runtime using ASP.NET Core Bold Report Viewer.
</p>
<ul>
<li>
Dynamic column is a feature that allows one to store different sets of columns for each row in a table.
<li>
In this table few columns are static and few can be varied, based on the column names selected in the parameter. This feature is achieved by changing the column visility based on the parameter selected.
In this table few columns are static and few can be varied, based on the column names selected in the parameter. This feature is achieved by changing the column visibility based on the parameter selected.
</li>
</ul>
<p>
Expand Down
Loading

0 comments on commit 86b7196

Please sign in to comment.