AspNetCore.ReportViewer 2.0.3.5

Microsoft.AspNetCore.Report, ReportViewer, ReportService

There is a newer version of this package available.
See the version list below for details.
Install-Package AspNetCore.ReportViewer -Version 2.0.3.5
dotnet add package AspNetCore.ReportViewer --version 2.0.3.5
<PackageReference Include="AspNetCore.ReportViewer" Version="2.0.3.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspNetCore.ReportViewer --version 2.0.3.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Microsoft.AspNetCore.Report, ReportViewer, ReportService
     
     var settings = new ReportSettings();
var appsettins = HttpHelper.AppSettings;
settings.ReportServer = appsettins.ReportServer;
settings.Credential = new NetworkCredential(appsettins.ReportUserName, appsettins.ReportPassword, appsettins.ReportDomain);
settings.UserAgent = (HttpHelper.HttpContext.Request.Headers as FrameRequestHeaders).HeaderUserAgent;
if (request.ExecuteType != ReportExecuteType.Export)
{
   request.RenderType = ReportRenderType.Html4_0;
}
settings.ShowToolBar = true;

settings = PrepareParamenters(settings);

var viewer = new ReportViewer(settings);
var response = viewer.Execute(request);
if (request.ExecuteType == ReportExecuteType.Export)
{
   start = request.Parameters.FirstOrDefault(x => x.Key.Equals("startDate", tringComparison.OrdinalIgnoreCase)).ConvertTo<DateTime>();
   end = request.Parameters.FirstOrDefault(x => x.Key.Equals("endDate", tringComparison.OrdinalIgnoreCase)).ConvertTo<DateTime>();
   var name = request.GetName();
   response.Data.FileName = $"{name}_{start.ToString("MMddyyyy")}-{end.ToString("MMddyyyy")}.{response.Data.Extension}";
}
the javascript ReportViewer.js,ToolBar.css at this package's content folder

<div id = "toolBar" >
   </ div >
   < div id= "viewer" >
   </ div >
   < script >
       var viewer = .reportViewer({
   toolBar: '#toolBar', // can set null that toolbar will in div#viewer
           server: "/Reports/LoadReport",
           request:
   {
       path: "/ScheduleReports/OvertimeReport"
           },
           //onError: function (message) { alert(message); },
           //onLoading: function () { },
           onLoaded: function(response, data) {
       if (.length == 0) {
                   .append('<button type="button" class="close" title="Close" style="font-size:50px;width:50px;color:#333;" onclick="exitFullscreen();"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>');
       }
   }
});
viewer.loadReport();
</script>

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.3.58 2,964 5/14/2018
2.0.3.38 258 4/5/2018
2.0.3.5 338 1/31/2018