using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace FastReport.Web.Blazor.Components.Internal { public partial class ExportsMenu { [Inject] protected IJSRuntime JSRuntime { get; set; } private async Task ExportReportAsync(Exports export) { string ext = ExportsHelper.GetExtFromExportType(export); string url = Save(ext); await JSRuntime.InvokeVoidAsync("open", url, "_blank"); } private string Save(string exportFormat) { return WebReport.template_export_url(exportFormat); } } }