Skip to content

Commit

Permalink
feature(REPORT-342363): public repo update
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishnu7101 authored and karthickthangasamy committed Dec 26, 2023
1 parent 68b2a81 commit 7df2924
Show file tree
Hide file tree
Showing 105 changed files with 404 additions and 334 deletions.
28 changes: 26 additions & 2 deletions Controllers/ReportWriterController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ public IActionResult generate(string reportName, string type)
reportWriter.ReportServerCredential = System.Net.CredentialCache.DefaultCredentials;

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

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

}

public class customBrowsertype : ExportSettings
{
private IWebHostEnvironment _hostingEnvironment;

public customBrowsertype(IWebHostEnvironment hostingEnvironment)
{
_hostingEnvironment = hostingEnvironment;
}
public override string GetImageFromHTML(string url)
{
return ConvertBase64(url).Result;
}
public async Task<string> ConvertBase64(string url)
{
string puppeteerChromeExe = _hostingEnvironment.WebRootPath + @"\puppeteer\Win-901912\chrome-win\chrome.exe";
await using var browser = await PuppeteerSharp.Puppeteer.LaunchAsync(new PuppeteerSharp.LaunchOptions { Headless = true, ExecutablePath = puppeteerChromeExe });
await using var page = await browser.NewPageAsync();
await page.GoToAsync(url);
return await page.WaitForSelectorAsync("#imagejsonData").Result.GetPropertyAsync("innerText").Result.JsonValueAsync<string>();
}
}
}


}
4 changes: 2 additions & 2 deletions Models/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public class Globals
{
public static string SERVICE_URL;
public static string DESIGNER_SERVICE_URL;
public static bool isPhatomJSExist;
public static bool isPuppeteerExist;
public Globals(IHttpContextAccessor _context, IWebHostEnvironment hostingEnvironment)
{
SERVICE_URL = _context.HttpContext.Request.PathBase + "/ReportViewerWebApi";
DESIGNER_SERVICE_URL = _context.HttpContext.Request.PathBase + "/ReportDesignerWebApi";
isPhatomJSExist = File.Exists(hostingEnvironment.WebRootPath + @"\PhantomJS\phantomjs.exe");
isPuppeteerExist = File.Exists(hostingEnvironment.WebRootPath + @"\puppeteer\Win-901912\chrome-win\chrome.exe");
}
}
public class CSRFHandler
Expand Down
47 changes: 24 additions & 23 deletions ReportsCoreSamples.csproj
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
</ItemGroup>
<ItemGroup>
<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="Bold.Licensing" Version="5.4.20" />
<PackageReference Include="BoldReports.AspNet.Core" Version="5.4.20" />
<PackageReference Include="BoldReports.CRI.Barcode" Version="5.4.20" />
<PackageReference Include="BoldReports.Net.Core" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.WebData" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.Csv" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.Excel" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.ElasticSearch" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.SSAS" Version="5.4.20" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="PuppeteerSharp" Version="5.0.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<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" />
<PackageReference Include="BoldReports.Data.MySQL" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.Oracle" Version="5.4.20" />
<PackageReference Include="BoldReports.Data.PostgreSQL" Version="5.4.20" />
</ItemGroup>
<ItemGroup>
<None Include="Controllers\**" CopyToOutputDirectory="Always" />
Expand Down
2 changes: 1 addition & 1 deletion Views/Barcode/index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<p>
More information about Barcode can be found in this <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/barcode/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
4 changes: 2 additions & 2 deletions Views/CompanySales/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<li>
Sorting is applied to row groups to sort the product category and sub-category in descending and ascending
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"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</li>
</ul>
<p>
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"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
6 changes: 3 additions & 3 deletions Views/ConditionalRowFormatting/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<div id="description">
<p>
This demo illustrates the Conditional Formatting feature along with <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-parameters/add/"
target="_blank">Report Parameters</a> using the Tablix data region. Based on the country name selected in the <code>Highlight Country</code>
target="_blank" rel="noreferrer">Report Parameters</a> using the Tablix data region. Based on the country name selected in the <code>Highlight Country</code>
parameter, the available customer details of the respective country are highlighted using conditional formatting. It makes the report easier
to read horizontally and enhances the look and feel of report.
</p>
<ul>
<li>
<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"
target="_blank">expression</a> for background color, thereby it highlights the rows based on the <code>Country Name</code> field.
target="_blank" rel="noreferrer">expression</a> for background color, thereby it highlights the rows based on the <code>Country Name</code> field.
</li>
</ul>
<p>
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/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
8 changes: 4 additions & 4 deletions Views/ConsolidatedBalanceSheet/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
Consolidated balance sheet RDLC report represents the assets and liabilities of a company and all subsidiaries
for the last four quarters in a single sheet using <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/"
target="_blank">Tablix</a> report item.
target="_blank" rel="noreferrer">Tablix</a> report item.
</p>
<ul>
<li>The <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/grouping-panel/"
target="_blank">Row grouping</a> feature is used to group the Assets type.</li>
target="_blank" rel="noreferrer">Row grouping</a> feature is used to group the Assets type.</li>
<li>Text box report items with currency value are formatted using <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/compose-report/properties-panel/#set-expression"
target="_blank">expression</a>.</li>
target="_blank" rel="noreferrer">expression</a>.</li>
<li>The data used in this table is a local JSON data.</li>
</ul>
<p>
More information about RDLC report can be found in this <a
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/rdlc-report/" target="_blank">documentation</a>
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/rdlc-report/" target="_blank" rel="noreferrer">documentation</a>
section.
</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions Views/CustomerSupportAnalysis/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
<li>
Sorting is applied to sort the <code>Representative Name</code> in <code>Average resolution time (hrs) by Representative</code> chart.
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"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</li>
<li>
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
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/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</li>
</ul>
<p>
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/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
2 changes: 1 addition & 1 deletion Views/DataBar/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<p>
More information about the Databar report item can be found in this <a
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-designer/designer-guide/report-items/data-bar/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
2 changes: 1 addition & 1 deletion Views/DynamicChartSeries/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</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/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
2 changes: 1 addition & 1 deletion Views/DynamicColumns/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ul>
<p>
More information about the Tablix data region can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
10 changes: 5 additions & 5 deletions Views/ExternalParameterReport/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@section control {
<form>
<div class="r-w-container">
<div class="r-w-container" id="external-container">
<div class="r-w-sample-container">
<ej-sample>
<bold-report-viewer id="reportviewer" report-service-url="@Globals.SERVICE_URL"
Expand Down Expand Up @@ -129,23 +129,23 @@
<p>
The Product Line Sales RDL report represents the best performing sales people and stores using <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/"
target="_blank">Tablix</a> and <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/chart/" target="_blank">Chart</a>
target="_blank" rel="noreferrer">Tablix</a> and <a
href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/chart/" target="_blank" rel="noreferrer">Chart</a>
report items.
</p>
<ul>
<li>
The sales details are organized by category and sub-category of products using the concept of external
report parameters which is designed using <a href="https://ej2.syncfusion.com/javascript/documentation/api/drop-down-list"
target="_blank">ejdropdownlist</a>. It allows users to filter Sub Category based on the selected
target="_blank" rel="noreferrer">ejdropdownlist</a>. It allows users to filter Sub Category based on the selected
Category.
</li>
<li>Non cascading parameters namely start date and end date also used in this report.</li>
</ul>
<p>
More information about handling the report items can be found in this <a
href="https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-designer/designer-guide/report-items/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
4 changes: 2 additions & 2 deletions Views/GroupingAggregate/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<li>Using the <code>Total</code> feature, the total sales amount for each quarter and year is calculated in Tablix data region.</li>
<li>
The sales value for each quarter is formatted in the <code>Currency </code> <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/compose-report/format-data/"
target="_blank">format</a> to improve the readability of report.
target="_blank" rel="noreferrer">format</a> to improve the readability of report.
</li>
</ul>
<p>
More information about the Tablix data region can be found in this <a href="https://help.boldreports.com/enterprise-reporting/designer-guide/report-designer/report-items/tablix/"
target="_blank">documentation</a> section.
target="_blank" rel="noreferrer">documentation</a> section.
</p>
</div>
}
Loading

0 comments on commit 7df2924

Please sign in to comment.