Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Chart report ignores new data source

$
0
0

Not sure what you mean by it not being clear which viewer is in use. It's the Telerik report viewer. Here is the registration from the .aspx page:

<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=10.1.16.615, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>

and the element:

             <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="600" Height="400" ParametersAreaVisible="False" ShowNavigationGroup="False" ShowHistoryButtons="False" ShowParametersButton="False"></telerik:ReportViewer>
                 <script type="text/javascript">
                     ReportViewer.prototype.OnReportLoadedOriginal = ReportViewer.prototype.OnReportLoaded;
   
                     ReportViewer.prototype.OnReportLoaded = function () {
                         this.OnReportLoadedOriginal();

                         var iframeID = this.clientID + "ReportFrame";

                         var iframe = document.getElementById(iframeID);

                         var wnd = iframe.contentWindow;

                         wnd.NavigateToUrl = function (url) {
                             window.radopen(url, "", 1025, 800);
                         };
                     }
                 </script>

 

The problem is, reportviewer1.RefreshReport does nothing. I have to manually click the refresh button on the viewer to refresh the report, and display the data from the dataset I just used:

     Dim graph = DirectCast(oReport.Items.Find("Graph1", True)(0), Telerik.Reporting.Graph)
        graph.DataSource = ds

        oReportSource.ReportDocument = oReport     ' this is the report with the graph on it
        ReportViewer1.ReportSource = oReportSource ' I set the report viewer's report source
        ReportViewer1.RefreshReport()   ' Does nothing


Viewing all articles
Browse latest Browse all 84751

Trending Articles