123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
-
- @if(WebReport.Toolbar.Exports.Show)
- {
- var exports = WebReport.Toolbar.Exports;
- <div class="fr-toolbar-item fr-@WebReport.ID-toolbar-item">
- <img src="_content/FastReport.Web/Resources/save.svg" />
- <div class="fr-toolbar-dropdown-content fr-@WebReport.ID-toolbar-dropdown-content">
- @if (exports.ShowPreparedReport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Prepared)">@Localization.preparedTxt </a>
- }
- @if (exports.ShowPdfExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Pdf)">@Localization.pdfTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button class="fr-webreport-settings-btn" @onclick="() => ClickSettingsExport(Exports.Pdf)"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowExcel2007Export)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Excel2007)">@Localization.excel2007Txt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.Excel2007)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowWord2007Export)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Word2007)">@Localization.word2007Txt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.Word2007)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowPowerPoint2007Export)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.PowerPoint2007)">@Localization.powerPoint2007Txt </a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button class="fr-webreport-settings-btn" @onclick="() => ClickSettingsExport(Exports.PowerPoint2007)"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowTextExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Text)">@Localization.textTxt</a>
- }
- @if (exports.ShowRtfExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Rtf)">@Localization.rtfTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button class="fr-webreport-settings-btn" @onclick="() => ClickSettingsExport(Exports.Rtf)"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowXpsExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Xps)">@Localization.xpsTxt</a>
- }
- @if (exports.ShowOdsExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Ods)">@Localization.odsTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.Ods)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowOdtExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Odt)">@Localization.odtTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.Odt)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowXmlExcelExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.XmlExcel)">@Localization.xmlTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button class="fr-webreport-settings-btn" @onclick="() => ClickSettingsExport(Exports.XmlExcel)"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @if (exports.ShowCsvExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Csv)">@Localization.csvTxt</a>
- }
- @if (exports.ShowExcel97Export)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Excel97)">@Localization.excel97Txt</a>
- }
- @if (ShowEmailExport)
- {
- <a _target="_blank" @onclick="() => ClickSettingsExport(Exports.Email)">@Localization.emailTxt</a>
- }
- @if (exports.ShowHpglExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Hpgl)">@Localization.hpglTxt</a>
- }
- @if (exports.ShowHTMLExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.HTML)">@Localization.htmlTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.HTML)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- @*@if (exports.ShowImageExport)
- {<a _target="_blank" href=@SaveImage>@Localization.imageTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button @onclick="() => ClickSettingsExport(Exports.Image)" class="fr-webreport-settings-btn"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }*@
- @if (exports.ShowJsonExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Json)">@Localization.jsonTxt</a>
- }
- @if (exports.ShowDxfExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Dxf)">@Localization.dxfTxt</a>
- }
- @if (exports.ShowLaTeXExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.LaTeX)">@Localization.latexTxt</a>
- }
- @if (exports.ShowPpmlExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Ppml)">@Localization.ppmlTxt</a>
- }
- @if (exports.ShowPSExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.PS)">@Localization.psTxt</a>
- }
- @if (exports.ShowXamlExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Xaml)">@Localization.xamlTxt</a>
- }
- @if (exports.ShowZplExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Zpl)">@Localization.zplTxt</a>
- }
- @if (exports.ShowDbfExport)
- {
- <a _target="_blank" @onclick="async () => await ExportReportAsync(Exports.Dbf)">@Localization.dbfTxt</a>
- }
- @if (exports.ShowSvgExport)
- {
- <a target="_blank" @onclick="async () => await ExportReportAsync(Exports.Svg)">@Localization.svgTxt</a>
- if (WebReport.Toolbar.Exports.EnableSettings)
- {
- <button class="fr-webreport-settings-btn" @onclick="() => ClickSettingsExport(Exports.Svg)"><img style="height:20px;" src="_content/FastReport.Web/Resources/settings.svg" /></button>
- }
- }
- </div>
- </div>
- }
- @code {
- [Parameter]
- public WebReport WebReport { get; set; }
- [Parameter]
- public Action OpenModalDialog { get; set; }
- #if WASM
- /// <summary>
- /// Not supported in Blazor WASM
- /// </summary>
- private bool ShowEmailExport = false;
- #else
- private bool ShowEmailExport => WebReport.Toolbar.Exports.ShowEmailExport;
- #endif
- protected override void OnParametersSet()
- {
- Localization = new ToolbarLocalization(WebReport.Res);
- }
- }
|