Search
Home
Website Services
LetItShine Update Service
YouTube Snip-O-Matic
Support
Terms And Conditions
Website Components & Solutions
Contact Support
Server Status
DNN Support Blog
Action Form Notes
Remote Assistance
LetItShine FileTransfer
Safe Setting Transfer
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Forums
>
DotNetNuke Support
>
DotNetNuke Support
Reply To Topic
Topic:
Refresh a report without refreshing the page
:
Posted By
Deleted User
on 4/22/2015 2:29 PM
Michael Pratt developed the following code to have the report refresh on a time interval instead. His directions for doing so follow here: This is placed in the PAGE HEADER OF THE PAGE THAT HAS THE REPORTS MODULE. You must first find the module ID using by viewing the page source. For Reports using HTML template, look for dnn_ctrXXXX_ViewReports_Visualizer_pnlContent (XXXX is the ModuleID) If your Reports module is using the basic gridview output, it will be dnn_ctrXXXX_ViewReports_Visualizer_grdResults -------------------------------------------------------------------------------------------------------------- Code for Page Header When using the HTML template option in reports(5000 indicates a refresh every 5 seconds) <script langauge="javascript"> window.setInterval("refreshDiv()", 5000); function refreshDiv(){ $('#dnn_ctr455_ViewReports_Visualizer_pnlContent').load(document.URL + ' #dnn_ctr455_ViewReports_Visualizer_pnlContent'); } </script> -------------------------------------------------------------------------------------------------------------- Code for Page Header When using the Gridview option in reports <script langauge="javascript"> window.setInterval("refreshDiv()", 5000); function refreshDiv(){ $('#dnn_ctr1308_ViewReports_Visualizer_grdResults').load(document.URL + ' #dnn_ctr1308_ViewReports_Visualizer_grdResults'); } </script>
Username:
Security Code:
Enter the code shown above in the box below.
Subject:
RE: Refresh a report without refreshing the page
Message:
Smilies
Submit
Cancel
Subscribe:
Check the box to receive email notifications for this topic.
Topic Review
Deleted User
New Member
Posts:62
4/22/2015 2:29 PM
Michael Pratt developed the following code to have the report refresh on a time interval instead. His directions for doing so follow here:
This is placed in the PAGE HEADER OF THE PAGE THAT HAS THE REPORTS MODULE.
You must first find the module ID using by viewing the page source.
For Reports using HTML template, look for dnn_ctrXXXX_ViewReports_Visualizer_pnlContent (XXXX is the ModuleID)
If your Reports module is using the basic gridview output, it will be dnn_ctrXXXX_ViewReports_Visualizer_grdResults
--------------------------------------------------------------------------------------------------------------
Code for Page Header When using the HTML template option in reports(5000 indicates a refresh every 5 seconds)
<script langauge="javascript">
window.setInterval("refreshDiv()", 5000);
function refreshDiv(){
$('#dnn_ctr455_ViewReports_Visualizer_pnlContent').load(document.URL + ' #dnn_ctr455_ViewReports_Visualizer_pnlContent');
}
</script>
--------------------------------------------------------------------------------------------------------------
Code for Page Header When using the Gridview option in reports
<script langauge="javascript">
window.setInterval("refreshDiv()", 5000);
function refreshDiv(){
$('#dnn_ctr1308_ViewReports_Visualizer_grdResults').load(document.URL + ' #dnn_ctr1308_ViewReports_Visualizer_grdResults');
}
</script>
Deleted User
New Member
Posts:62
4/22/2015 2:25 PM
I had a page with multiple modules on it and one was a report that I wanted to refresh without refreshing the entire page. I was able to accomplish this by setting up a button with some javascript.
The html looks like this:
<button onclick="$('#dnn_ctr1571_ViewReports_Visualizer_grdResults').load(document.URL + ' #dnn_ctr1571_ViewReports_Visualizer_grdResults');return false; ">Refresh Report</button>
Get the ID of the div for the report you want to refresh by viewing the page source.
-For Reports using HTML template, look for dnn_ctrXXXX_ViewReports_Visualizer_pnlContent (XXXX is the ModuleID)
-If your Reports module is using the basic gridview output, it will be dnn_ctrXXXX_ViewReports_Visualizer_grdResults