|
| 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 | +  |
| 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