Skip to content

Commit 7df2924

Browse files
Vishnu7101karthickthangasamy
authored andcommitted
feature(REPORT-342363): public repo update
1 parent 68b2a81 commit 7df2924

File tree

105 files changed

+404
-334
lines changed

Some content is hidden

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

105 files changed

+404
-334
lines changed

Controllers/ReportWriterController.cs

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ public IActionResult generate(string reportName, string type)
5858
reportWriter.ReportServerCredential = System.Net.CredentialCache.DefaultCredentials;
5959

6060
reportWriter.ReportProcessingMode = ProcessingMode.Remote;
61-
reportWriter.ExportResources.UsePhantomJS = true;
62-
reportWriter.ExportResources.PhantomJSPath = basePath + @"\PhantomJS\";
61+
reportWriter.ExportSettings = new customBrowsertype(_hostingEnvironment);
62+
reportWriter.ExportResources.BrowserType = ExportResources.BrowserTypes.External;
63+
reportWriter.ExportResources.ResourcePath = basePath + @"/puppeteer/";
6364

6465
FileStream inputStream = new FileStream(basePath + @"\Resources\Report\" + reportName + ".rdl", FileMode.Open, FileAccess.Read);
6566
reportWriter.LoadReport(inputStream);
@@ -127,6 +128,29 @@ public IActionResult generate(string reportName, string type)
127128
}
128129

129130
}
131+
132+
public class customBrowsertype : ExportSettings
133+
{
134+
private IWebHostEnvironment _hostingEnvironment;
135+
136+
public customBrowsertype(IWebHostEnvironment hostingEnvironment)
137+
{
138+
_hostingEnvironment = hostingEnvironment;
139+
}
140+
public override string GetImageFromHTML(string url)
141+
{
142+
return ConvertBase64(url).Result;
143+
}
144+
public async Task<string> ConvertBase64(string url)
145+
{
146+
string puppeteerChromeExe = _hostingEnvironment.WebRootPath + @"\puppeteer\Win-901912\chrome-win\chrome.exe";
147+
await using var browser = await PuppeteerSharp.Puppeteer.LaunchAsync(new PuppeteerSharp.LaunchOptions { Headless = true, ExecutablePath = puppeteerChromeExe });
148+
await using var page = await browser.NewPageAsync();
149+
await page.GoToAsync(url);
150+
return await page.WaitForSelectorAsync("#imagejsonData").Result.GetPropertyAsync("innerText").Result.JsonValueAsync<string>();
151+
}
152+
}
130153
}
131154

155+
132156
}

Models/Globals.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public class Globals
1313
{
1414
public static string SERVICE_URL;
1515
public static string DESIGNER_SERVICE_URL;
16-
public static bool isPhatomJSExist;
16+
public static bool isPuppeteerExist;
1717
public Globals(IHttpContextAccessor _context, IWebHostEnvironment hostingEnvironment)
1818
{
1919
SERVICE_URL = _context.HttpContext.Request.PathBase + "/ReportViewerWebApi";
2020
DESIGNER_SERVICE_URL = _context.HttpContext.Request.PathBase + "/ReportDesignerWebApi";
21-
isPhatomJSExist = File.Exists(hostingEnvironment.WebRootPath + @"\PhantomJS\phantomjs.exe");
21+
isPuppeteerExist = File.Exists(hostingEnvironment.WebRootPath + @"\puppeteer\Win-901912\chrome-win\chrome.exe");
2222
}
2323
}
2424
public class CSRFHandler

ReportsCoreSamples.csproj

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
44
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
55
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
77
<AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
88
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
99
</PropertyGroup>
10-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
11-
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.0" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0" />
13-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
14-
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
10+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
11+
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.0" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
13+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
14+
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
15+
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
1516
</ItemGroup>
1617
<ItemGroup>
17-
<PackageReference Include="Bold.Licensing" Version="5.3.8" />
18-
<PackageReference Include="BoldReports.AspNet.Core" Version="5.3.8" />
19-
<PackageReference Include="BoldReports.CRI.Barcode" Version="5.3.8" />
20-
<PackageReference Include="BoldReports.Net.Core" Version="5.3.8" />
21-
<PackageReference Include="BoldReports.Data.WebData" Version="5.3.8" />
22-
<PackageReference Include="BoldReports.Data.Csv" Version="5.3.8" />
23-
<PackageReference Include="BoldReports.Data.Excel" Version="5.3.8" />
24-
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="5.3.8" />
25-
<PackageReference Include="BoldReports.Data.SSAS" Version="5.3.8" />
26-
<PackageReference Include="BuildBundlerMinifier" Version="2.9.406" />
27-
<PackageReference Include="log4net" Version="2.0.10" />
28-
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
29-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
30-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
18+
<PackageReference Include="Bold.Licensing" Version="5.4.20" />
19+
<PackageReference Include="BoldReports.AspNet.Core" Version="5.4.20" />
20+
<PackageReference Include="BoldReports.CRI.Barcode" Version="5.4.20" />
21+
<PackageReference Include="BoldReports.Net.Core" Version="5.4.20" />
22+
<PackageReference Include="BoldReports.Data.WebData" Version="5.4.20" />
23+
<PackageReference Include="BoldReports.Data.Csv" Version="5.4.20" />
24+
<PackageReference Include="BoldReports.Data.Excel" Version="5.4.20" />
25+
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="5.4.20" />
26+
<PackageReference Include="BoldReports.Data.SSAS" Version="5.4.20" />
27+
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
28+
<PackageReference Include="log4net" Version="2.0.15" />
29+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
30+
<PackageReference Include="PuppeteerSharp" Version="5.0.0" />
31+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
3132
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
32-
<PackageReference Include="BoldReports.Data.MySQL" Version="5.3.8" />
33-
<PackageReference Include="BoldReports.Data.Oracle" Version="5.3.8" />
34-
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="5.3.8" />
33+
<PackageReference Include="BoldReports.Data.MySQL" Version="5.4.20" />
34+
<PackageReference Include="BoldReports.Data.Oracle" Version="5.4.20" />
35+
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="5.4.20" />
3536
</ItemGroup>
3637
<ItemGroup>
3738
<None Include="Controllers\**" CopyToOutputDirectory="Always" />

Views/Barcode/index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<p>
2020
More information about Barcode can be found in this <a
2121
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/barcode/"
22-
target="_blank">documentation</a> section.
22+
target="_blank" rel="noreferrer">documentation</a> section.
2323
</p>
2424
</div>
2525
}

Views/CompanySales/Index.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
<li>
3636
Sorting is applied to row groups to sort the product category and sub-category in descending and ascending
3737
orders. More information about sorting data in matrix groups can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/sort-data-in-tablix-data-region/#set-sort-expression-on-a-tablix-group"
38-
target="_blank">documentation</a> section.
38+
target="_blank" rel="noreferrer">documentation</a> section.
3939
</li>
4040
</ul>
4141
<p>
4242
Company Sales report designing steps can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/matrix/design-ssrs-matrix-report/#format-matrix-design"
43-
target="_blank">documentation</a> section.
43+
target="_blank" rel="noreferrer">documentation</a> section.
4444
</p>
4545
</div>
4646
}

Views/ConditionalRowFormatting/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
<div id="description">
1111
<p>
1212
This demo illustrates the Conditional Formatting feature along with <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-parameters/add/"
13-
target="_blank">Report Parameters</a> using the Tablix data region. Based on the country name selected in the <code>Highlight Country</code>
13+
target="_blank" rel="noreferrer">Report Parameters</a> using the Tablix data region. Based on the country name selected in the <code>Highlight Country</code>
1414
parameter, the available customer details of the respective country are highlighted using conditional formatting. It makes the report easier
1515
to read horizontally and enhances the look and feel of report.
1616
</p>
1717
<ul>
1818
<li>
1919
<b>Conditional IIF Statement</b> is used to build <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/compose-report/properties-panel/#set-expression"
20-
target="_blank">expression</a> for background color, thereby it highlights the rows based on the <code>Country Name</code> field.
20+
target="_blank" rel="noreferrer">expression</a> for background color, thereby it highlights the rows based on the <code>Country Name</code> field.
2121
</li>
2222
</ul>
2323
<p>
2424
Conditional row formatting report designing steps can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/conditional-formatting-tablix-data-region/"
25-
target="_blank">documentation</a> section.
25+
target="_blank" rel="noreferrer">documentation</a> section.
2626
</p>
2727
</div>
2828
}

Views/ConsolidatedBalanceSheet/Index.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
Consolidated balance sheet RDLC report represents the assets and liabilities of a company and all subsidiaries
2121
for the last four quarters in a single sheet using <a
2222
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/"
23-
target="_blank">Tablix</a> report item.
23+
target="_blank" rel="noreferrer">Tablix</a> report item.
2424
</p>
2525
<ul>
2626
<li>The <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/grouping-panel/"
27-
target="_blank">Row grouping</a> feature is used to group the Assets type.</li>
27+
target="_blank" rel="noreferrer">Row grouping</a> feature is used to group the Assets type.</li>
2828
<li>Text box report items with currency value are formatted using <a
2929
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/compose-report/properties-panel/#set-expression"
30-
target="_blank">expression</a>.</li>
30+
target="_blank" rel="noreferrer">expression</a>.</li>
3131
<li>The data used in this table is a local JSON data.</li>
3232
</ul>
3333
<p>
3434
More information about RDLC report can be found in this <a
35-
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/rdlc-report/" target="_blank">documentation</a>
35+
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/rdlc-report/" target="_blank" rel="noreferrer">documentation</a>
3636
section.
3737
</p>
3838
</div>

Views/CustomerSupportAnalysis/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
<li>
2222
Sorting is applied to sort the <code>Representative Name</code> in <code>Average resolution time (hrs) by Representative</code> chart.
2323
More information about sorting data in matrix groups can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/sort-data-in-tablix-data-region/#set-sort-expression-on-a-tablix-group"
24-
target="_blank">documentation</a> section.
24+
target="_blank" rel="noreferrer">documentation</a> section.
2525
</li>
2626
<li>
2727
The <code>TopN</code> filter is applied to the table data region to display the <code>Top 5 Satisfied Customer</code>. More information on filtering data with table
2828
data region can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/add-filters-to-tablix-data-region/"
29-
target="_blank">documentation</a> section.
29+
target="_blank" rel="noreferrer">documentation</a> section.
3030
</li>
3131
</ul>
3232
<p>
3333
More information about chart data region can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/chart/"
34-
target="_blank">documentation</a> section.
34+
target="_blank" rel="noreferrer">documentation</a> section.
3535
</p>
3636
</div>
3737
}

Views/DataBar/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<p>
1717
More information about the Databar report item can be found in this <a
1818
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-designer/designer-guide/report-items/data-bar/"
19-
target="_blank">documentation</a> section.
19+
target="_blank" rel="noreferrer">documentation</a> section.
2020
</p>
2121
</div>
2222
}

Views/DynamicChartSeries/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</p>
2222
<p>
2323
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/"
24-
target="_blank">documentation</a> section.
24+
target="_blank" rel="noreferrer">documentation</a> section.
2525
</p>
2626
</div>
2727
}

0 commit comments

Comments
 (0)