Skip to content

Commit 6e9ac46

Browse files
github-actions[bot]KB BotIvetNikolovaDimitarNikolovv06
authored
Added new kb article rename-move-preview-button-html5-asp-net-report-viewer (#1735)
* Added new kb article rename-move-preview-button-html5-asp-net-report-viewer * Update rename-move-preview-button-html5-asp-net-report-viewer.md * Add files via upload * Update rename-move-preview-button-html5-asp-net-report-viewer.md --------- Co-authored-by: KB Bot <[email protected]> Co-authored-by: IvetNikolova <[email protected]> Co-authored-by: Dimitar Nikolov <[email protected]>
1 parent 2f5d56d commit 6e9ac46

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
7.56 KB
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Renaming and Repositioning Preview Button in HTML5-based Report Viewers
3+
description: "Learn how to rename and move the Preview button in the parameters section of the HTML5-based Report Viewers."
4+
type: how-to
5+
page_title: Changing and Moving the Preview Button in HTML5 Report Viewer
6+
meta_title: Changing and Moving the Preview Button in HTML5 Report Viewer
7+
slug: rename-move-preview-button-html5-asp-net-report-viewer
8+
tags: html5, reportviewer, preview-button, parameters, localization
9+
res_type: kb
10+
ticketid: 1690422
11+
---
12+
13+
## Environment
14+
15+
<table>
16+
<tbody>
17+
<tr>
18+
<td> Product </td>
19+
<td> Progress® Telerik® Reporting </td>
20+
</tr>
21+
<tr>
22+
<td> Viewer </td>
23+
<td> HTML5-based Report Viewers </td>
24+
</tr>
25+
</tbody>
26+
</table>
27+
28+
## Description
29+
30+
I want to rename the **Preview** button in the HTML5 Report Viewer or one of its wrappers to match my custom requirements. Additionally, I want to reposition the **Preview** button to the top of the parameters area instead of its default position at the bottom.
31+
32+
## Solution
33+
34+
### Renaming the Preview Button
35+
36+
1. Locate the `telerikReportViewer.stringResources-{{site.buildversion}}.js` file in the installation folder - `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Html5\ReportViewer\js`.
37+
1. Open the file and replace the `parametersAreaPreviewButton: "Preview"` value with your desired button name.
38+
1. Copy the updated `telerikReportViewer.stringResources-{{site.buildversion}}.js` file to your project's `Scripts` folder(*or any folder that you provide local files from such as __wwwroot__*).
39+
40+
![The stringResource script file placed in a local directory inside the project](images/ScriptFolderWebForms.png)
41+
42+
1. Reference the updated script file on the page with the HTML5-based Report Viewer before the `telerikReportViewer` script. For example:
43+
44+
````HTML
45+
<script src="/Scripts/telerikReportViewer.stringResources-19.1.25.521.js"></script>
46+
<script src="/api/reports/resources/js/telerikReportViewer"></script>
47+
````
48+
49+
50+
1. Compile and run your project to verify the updated button name.
51+
52+
### Moving the Preview Button to the Top
53+
54+
Use the followig CSS to move the **Preview** button to the top of the parameters area:
55+
56+
````CSS
57+
.trv-parameters-area.preview .trv-parameters-area-footer {
58+
top: 0;
59+
}
60+
61+
.trv-report-viewer .trv-parameters-area.preview .trv-parameters-area-content {
62+
top: 3em;
63+
bottom: 0;
64+
}
65+
````
66+
67+
68+
## See Also
69+
70+
* [Localization of the HTML5 Report Viewers]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/customizing/localization%})
71+
* [Move Preview Button at the Top of Parameters Area]({%slug how-to-move-preview-button-at-the-top-of-parameters-area%})

0 commit comments

Comments
 (0)