12345678910111213141516171819202122232425 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Components;
- using Microsoft.JSInterop;
- namespace FastReport.Web.Blazor.Components
- {
- public partial class Toolbar
- {
- [Inject]
- protected IJSRuntime JSRuntime { get; set; }
- private async Task PrintReportAsync(PrintTypes type)
- {
- var printFormat = type is PrintTypes.HTML ? "html" : "pdf";
- var url = WebReport.template_print_url(printFormat);
- await JSRuntime.InvokeVoidAsync("window.open", url, "_blank");
- }
- }
- }
|