Skip to content

Commit daae438

Browse files
feature(REPORT-509331): Bold Reports 13.1 release changes
1 parent 13eb3ea commit daae438

170 files changed

Lines changed: 1605 additions & 434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Controllers/ExternalReportServer.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ public override System.IO.Stream GetReport()
217217

218218
private Stream ReadFiles(string filePath)
219219
{
220+
#pragma warning disable SCS0018
220221
using (FileStream fileStream = File.OpenRead(filePath))
222+
#pragma warning restore SCS0018
221223
{
222224
fileStream.Position = 0;
223225
MemoryStream memStream = new MemoryStream();
@@ -234,7 +236,10 @@ public override bool EditReport(byte[] reportdata)
234236
string catagoryName = reportPath.Substring(0, reportPath.IndexOf('/') > 0 ? reportPath.IndexOf('/') : 0).Trim();
235237
string targetFolder = Path.Combine(this.basePath, "resources", "Report");
236238
string reportPat = Path.Combine(targetFolder, catagoryName, reportName);
239+
#pragma warning disable SCS0018
237240
File.WriteAllBytes(reportPat, reportdata.ToArray());
241+
#pragma warning restore SCS0018
242+
238243
return true;
239244
}
240245

@@ -298,7 +303,9 @@ T DeseralizeObj<T>(Stream str)
298303
{
299304
XmlSerializer serializer = new XmlSerializer(typeof(T));
300305
XmlReader reader = XmlReader.Create(str);
306+
#pragma warning disable SCS0028
301307
return (T)serializer.Deserialize(reader);
308+
#pragma warning restore SCS0028
302309
}
303310

304311
private Stream GetFileToStream(byte[] _fileContent)

Controllers/ReportDesignerWebApiController.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public object GetImage(string key, string image)
6767
return ReportDesignerHelper.GetImage(key, image, this);
6868
}
6969

70+
#pragma warning disable SCS0016
7071
[HttpPost]
7172
public bool DisposeObjects()
7273
{
@@ -96,7 +97,9 @@ public bool DisposeObjects()
9697

9798
if (files.Length == 0 || (files.Length == fileCount))
9899
{
100+
#pragma warning disable SCS0018
99101
Directory.Delete(dirs[index], true);
102+
#pragma warning restore SCS0018
100103
}
101104
}
102105
}
@@ -108,6 +111,7 @@ public bool DisposeObjects()
108111
}
109112
return false;
110113
}
114+
#pragma warning restore SCS0016
111115

112116

113117
[ActionName("GetResource")]
@@ -146,17 +150,21 @@ public object PostDesignerAction([FromBody] Dictionary<string, object> jsonResul
146150
return ReportDesignerHelper.ProcessDesigner(jsonResult, this, null, this._cache);
147151
}
148152

153+
#pragma warning disable SCS0016
149154
[HttpPost]
150155
public object PostFormDesignerAction()
151156
{
152157
return ReportDesignerHelper.ProcessDesigner(null, this, null, this._cache);
153158
}
159+
#pragma warning restore SCS0016
154160

161+
#pragma warning disable SCS0016
155162
[HttpPost]
156163
public object PostFormReportAction()
157164
{
158165
return ReportHelper.ProcessReport(null, this, this._cache);
159166
}
167+
#pragma warning restore SCS0016
160168

161169
[HttpPost]
162170
public object PostReportAction([FromBody] Dictionary<string, object> jsonResult)
@@ -165,11 +173,13 @@ public object PostReportAction([FromBody] Dictionary<string, object> jsonResult)
165173
return ReportHelper.ProcessReport(jsonResult, this, this._cache);
166174
}
167175

176+
#pragma warning disable SCS0016
168177
[HttpPost]
169178
public void UploadReportAction()
170179
{
171180
ReportDesignerHelper.ProcessDesigner(null, this, this.Request.Form.Files[0], this._cache);
172181
}
182+
#pragma warning restore SCS0016
173183

174184
private string GetFilePath(string itemName, string key)
175185
{
@@ -207,9 +217,13 @@ public bool SetData(string key, string itemId, ItemInfo itemData, out string err
207217

208218
if (System.IO.File.Exists(writePath))
209219
{
220+
#pragma warning disable SCS0018
210221
System.IO.File.Delete(writePath);
222+
#pragma warning restore SCS0018
211223
}
224+
#pragma warning disable SCS0018
212225
System.IO.File.WriteAllBytes(writePath, bytes);
226+
#pragma warning restore SCS0018
213227
stream.Close();
214228
stream.Dispose();
215229
}
@@ -232,7 +246,9 @@ public ResourceInfo GetData(string key, string itemId)
232246
var filePath = this.GetFilePath(itemId, key);
233247
if (itemId.Equals(Path.GetFileName(filePath), StringComparison.InvariantCultureIgnoreCase) && System.IO.File.Exists(filePath))
234248
{
249+
#pragma warning disable SCS0018
235250
resource.Data = System.IO.File.ReadAllBytes(filePath);
251+
#pragma warning restore SCS0018
236252
LogExtension.LogInfo(string.Format("Method Name: {0}; Class Name: {1}; Message: {2};", "GetData", "CacheHelper", string.Format("File data retrieved from the path: {0}", filePath)), null);
237253
}
238254
else
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace ReportsCoreSamples.Controllers
8+
{
9+
[Route("report-viewer/nda-report")]
10+
public class NdaReportController : PreviewController
11+
{
12+
[HttpGet("")]
13+
public IActionResult Index()
14+
{
15+
this.updateMetaData();
16+
return View();
17+
}
18+
}
19+
}

Controllers/ReportViewerWebApiController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ public object GetResource(ReportResource resource)
9393
return ReportHelper.GetResource(resource, this, this._cache);
9494
}
9595

96+
#pragma warning disable SCS0016
9697
[HttpPost]
9798
public object PostFormReportAction()
9899
{
99100
return ReportHelper.ProcessReport(null, this, _cache);
100101
}
102+
#pragma warning restore SCS0016
101103
public void LogError(string message, Exception exception, MethodBase methodType, ErrorType errorType)
102104
{
103105
LogExtension.LogError(message, exception, methodType, errorType == ErrorType.Error ? "Error" : "Info");

Controllers/ReportWriterController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public ActionResult Index()
4040
return View();
4141
}
4242

43+
#pragma warning disable SCS0016
4344
[HttpPost("generate")]
4445
public IActionResult Generate(string reportName, string type)
4546
{
@@ -138,6 +139,7 @@ public IActionResult Generate(string reportName, string type)
138139
}
139140

140141
}
142+
#pragma warning restore SCS0016
141143
}
142144

143145
public class customBrowsertype : ExportSettings
-35.8 KB
Binary file not shown.
30 KB
Binary file not shown.

ReportsCoreSamples.csproj

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,43 @@
1313
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.10" />
1414
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10" />
1515
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
16-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
16+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.5" />
1717
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
1818
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.12.0" />
19-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" />
19+
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="Bold.Licensing" Version="12.1.12" />
23-
<PackageReference Include="BoldReports.AspNet.Core" Version="12.1.12" />
24-
<PackageReference Include="BoldReports.CRI.Barcode" Version="12.1.12" />
25-
<PackageReference Include="BoldReports.CRI.Signature" Version="12.1.12" />
26-
<PackageReference Include="BoldReports.CRI.Shape" Version="12.1.12" />
27-
<PackageReference Include="BoldReports.CRI.Html" Version="12.1.12">
28-
<ExcludeAssets>native</ExcludeAssets>
22+
<PackageReference Include="Bold.Licensing" Version="13.1.26" />
23+
<PackageReference Include="BoldReports.AspNet.Core" Version="13.1.26" />
24+
<PackageReference Include="BoldReports.CRI.Barcode" Version="13.1.26" />
25+
<PackageReference Include="BoldReports.CRI.Signature" Version="13.1.26" />
26+
<PackageReference Include="BoldReports.CRI.Shape" Version="13.1.26" />
27+
<PackageReference Include="BoldReports.CRI.Html" Version="13.1.26">
28+
<IncludeAssets>compile;runtime</IncludeAssets>
2929
</PackageReference>
30-
<PackageReference Include="BoldReports.CRI.Pdf" Version="12.1.12" />
31-
<PackageReference Include="BoldReports.Net.Core" Version="12.1.12" />
32-
<PackageReference Include="BoldReports.Data.WebData" Version="12.1.12" />
33-
<PackageReference Include="BoldReports.Data.Csv" Version="12.1.12" />
34-
<PackageReference Include="BoldReports.Data.Excel" Version="12.1.12" />
35-
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="12.1.12" />
36-
<PackageReference Include="BoldReports.Data.SSAS" Version="12.1.12" />
30+
<PackageReference Include="BoldReports.CRI.Pdf" Version="13.1.26" />
31+
<PackageReference Include="BoldReports.Net.Core" Version="13.1.26" />
32+
<PackageReference Include="BoldReports.Data.WebData" Version="13.1.26" />
33+
<PackageReference Include="BoldReports.Data.Csv" Version="13.1.26" />
34+
<PackageReference Include="BoldReports.Data.Excel" Version="13.1.26" />
35+
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="13.1.26" />
36+
<PackageReference Include="BoldReports.Data.SSAS" Version="13.1.26" />
37+
<PackageReference Include="BoldReports.Data.AWSSecretsManager" Version="13.1.26" />
3738
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
3839
<PackageReference Include="log4net" Version="2.0.15" />
3940
<PackageReference Include="PuppeteerSharp" Version="5.0.0" />
4041
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7">
4142
<PrivateAssets>all</PrivateAssets>
4243
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4344
</PackageReference>
44-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
45+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.11" />
4546
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
46-
<PackageReference Include="BoldReports.Data.MySQL" Version="12.1.12" />
47-
<PackageReference Include="BoldReports.Data.Oracle" Version="12.1.12" />
48-
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="12.1.12" />
49-
<PackageReference Include="BoldReports.Data.Snowflake" Version="12.1.12" />
50-
<PackageReference Include="BoldReports.Data.GoogleBigQuery" Version="12.1.12" />
51-
<PackageReference Include="BoldReports.Data.MongoDB" Version="12.1.12" />
47+
<PackageReference Include="BoldReports.Data.MySQL" Version="13.1.26" />
48+
<PackageReference Include="BoldReports.Data.Oracle" Version="13.1.26" />
49+
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="13.1.26" />
50+
<PackageReference Include="BoldReports.Data.Snowflake" Version="13.1.26" />
51+
<PackageReference Include="BoldReports.Data.GoogleBigQuery" Version="13.1.26" />
52+
<PackageReference Include="BoldReports.Data.MongoDB" Version="13.1.26" />
5253
</ItemGroup>
5354
<ItemGroup>
5455
<None Include="Controllers\**" CopyToOutputDirectory="Always" />

Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public Startup(IConfiguration configuration, IWebHostEnvironment _hostingEnviron
3131
{
3232
log4net.GlobalContext.Properties["LogPath"] = _hostingEnvironment.ContentRootPath;
3333
LogExtension.RegisterLog4NetConfig();
34+
#pragma warning disable SCS0018
3435
string License = File.ReadAllText(System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "BoldLicense.txt"), Encoding.UTF8);
36+
#pragma warning restore SCS0018
3537
BoldLicenseProvider.RegisterLicense(License, bool.Parse(configuration.GetSection("appSettings").GetSection("IsOfflineLicense").Value), bool.Parse(configuration.GetSection("appSettings").GetSection("EnableLicenseLog").Value));
3638
ReportConfig.DefaultSettings = new ReportSettings()
3739
{

Views/NdaReport/Index.cshtml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@inject Globals globals;
2+
3+
@section control {
4+
5+
<bold-report-viewer id="reportviewer" report-service-url="@Globals.SERVICE_URL" report-path="nda-report.rdl" toolbar-rendering="onToolbarRendering" tool-bar-item-click="onToolBarItemClick" export-item-click="onExportItemClick" />
6+
7+
}
8+
9+
@section description {
10+
<div id="description">
11+
<p>The report demonstrates the PDF digital signature functionality in a Non-Disclosure Agreement (NDA) document. It
12+
highlights secure signing and verification features for professional agreements.</p>
13+
<ul>
14+
<li>Illustrates PDF digital signature integration within reports.</li>
15+
<li>Uses a real-world NDA template for practical demonstration.</li>
16+
<li>Shows how signatures, names, dates, and locations are captured in the report item.</li>
17+
</ul>
18+
<p>
19+
More information about the PDF signature report item can be found in this <a
20+
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/signature/design-report-with-pdf-signature/"
21+
target="_blank" rel="noreferrer">documentation</a> section.
22+
</p>
23+
</div>
24+
}

0 commit comments

Comments
 (0)