8687dfb1334e48f21167a28e9cdde0c8f2c74a81
FAQ/force-update-results-on-report.md
| ... | ... | @@ -0,0 +1,28 @@ |
| 1 | +#How Do I Force a User to Click on 'Update Results' Before Showing Any Data? |
|
| 2 | + |
|
| 3 | +To ensure a user must click on "Update Results" before showing any report data (regardless if there are filter parameters or not). |
|
| 4 | + |
|
| 5 | +Add the following to the _ReportViewer-Body.ascx_ file in the ``<script>`` tag at the very bottom: |
|
| 6 | + |
|
| 7 | +```javascript |
|
| 8 | +function GotReportViewerConfig(returnObj, id) { |
|
| 9 | + if (id != 'reportviewerconfig' || returnObj == undefined || returnObj == null) |
|
| 10 | + return; |
|
| 11 | + nrvConfig = returnObj; |
|
| 12 | + if (document.getElementById('rlhref') != null) |
|
| 13 | + document.getElementById('rlhref').href = nrvConfig.ReportListUrl; |
|
| 14 | + urlSettings = new UrlSettings(nrvConfig.ResponseServerUrl); |
|
| 15 | + responseServer = new AdHoc.ResponseServer(urlSettings.urlRsPage + '?', 0); |
|
| 16 | + responseServerWithDelimeter = responseServer; |
|
| 17 | + ChangeTopRecords(nrvConfig.InitialResults, false); |
|
| 18 | + if (urlSettings.reportInfo.exportType != null) { |
|
| 19 | + responseServer.OpenUrlWithModalDialogNewCustomRsUrl('rs.aspx?output=' + urlSettings.reportInfo.exportType, 'aspnetForm', 'reportFrame', nrvConfig.ResponseServerUrl); |
|
| 20 | + }; |
|
| 21 | + ApplySecurityOptions(); |
|
| 22 | + GetFiltersData(); |
|
| 23 | + if (initialized) |
|
| 24 | + return; |
|
| 25 | + initialized = true; |
|
| 26 | + FirstLoadInit(); |
|
| 27 | +} |
|
| 28 | +``` |
|
| ... | ... | \ No newline at end of file |