This is a migrated thread and some comments may be shown as answers.

Reportviewer and AjaxManager

4 Answers 196 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 12 Mar 2008, 09:07 AM
Hi

I'm having a problem using the ReportViewer with radAjaxManager (Prometheus)

I have a button click event which updates the report datasource
HOWEVER with radAjaxManager enabled,
the report doesn't update correctly and shows zero records

When the radAjaxManager AjaxEnabled is set to false
The report refreshes successfully...

I've tried hooking the radAjaxManager to both the Reportviewer and a panel containing the Reportviewer

Hope someone can help...


Here's the ASPX
===============
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ButtonRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ReportViewer1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<asp:Button ID="ButtonRefresh" runat="server" Text="Refresh" />
<br />

<asp:Panel ID="PanelReport" runat="server">
    <telerik:ReportViewer id="ReportViewer1" runat="server">
    </telerik:ReportViewer>
</asp:Panel>


This is the code behind
=======================
    Protected Sub ButtonRefresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonRefresh.Click
        Me.ReportBindIt(" FullName LIKE '%hoey%' ")
    End Sub

    Public Sub ReportBindIt(ByVal Criteria As String)

        Dim TelerikReport As New CaseReports.A4_CaseReport1
        Dim sqlSelectCommand1 As New SqlCommand()
        Dim sqlDataAdapter1 As New SqlDataAdapter()
        Dim sqlConnection1 As New SqlConnection()

        sqlConnection1.ConnectionString = GetConnectionString()
        sqlSelectCommand1.CommandText = "dbo.procGetReportCaseList1"
        sqlSelectCommand1.CommandType = Data.CommandType.StoredProcedure

        sqlSelectCommand1.Parameters.AddWithValue("Criteria", Criteria)
        sqlSelectCommand1.Parameters.AddWithValue("SortExpression", "fileref DESC")

        sqlSelectCommand1.Connection = sqlConnection1
        sqlDataAdapter1.SelectCommand = sqlSelectCommand1

        TelerikReport.DataSource = sqlDataAdapter1
        ReportViewer1.Report = TelerikReport


    End Sub

4 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 12 Mar 2008, 03:55 PM
Hi Martin,

Currently the RadAjaxManager from the "Prometheus" suite cannot update the ReportViewer as it is generally designed to update controls compatible with the ASP.NET AJAX framework. Unfortunately, the report viewer is still not in this list.

To update the viewer you can use the RadAjaxManager from the classic ASP.NET suite.

Hope this helps. Let me know if you have any other questions.


All the best,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martin
Top achievements
Rank 1
answered on 12 Mar 2008, 05:35 PM
Hi Chavdar

Many thanks for that...

I should be able to work round the problem now...
Just a couple of questions....

- Are there any approx timescales on when the Report component will be updated to Prometheus/ASP.NET AJAX?

- I'll need to MIX Prometheus RadAjaxManager and Classic RadAjaxManager on the same page, should that cause any problems?

- Is it generally OK to use ObjectDatasource as the Report datasource?

For testing I used a SQL Adaptor but I have already used an ObjectDatasource accessing a business object which seems to work OK...
My code:
        Dim TelerikReport As New CaseReports.A4_CaseReport1
        TelerikReport.DataSource = Me.ObjectDataSourceReport
        ReportViewer1.Report = TelerikReport

Regards

Martin Hoey


0
Chavdar
Telerik team
answered on 13 Mar 2008, 03:00 PM
Hello Martin,

Up to your questions:

    - The exact Q in which the requested functionality will be available is not determined yet as we are still working on the new features from the current roadmap. However, we will try to make it as soon as possible.

    - You should not have any problems using both AjaxManagers on the same page. Please check the following article: RadAjax ASP.NET vs  Prometheus.

    - You can use any of the data sources described in the Connecting Data to A Report help article with equal priority. It is up to you to decide which of them fits best in your application.

Sincerely yours,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martin
Top achievements
Rank 1
answered on 14 Mar 2008, 10:51 AM
Hi Chavdar

Many thanls for all your help...

After some testing I've decided to go wiith RadAjax Prometheus as the performance is much better.

I'll await a Prometheus Report component with anticipation!

Thanks again

Martin

Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Martin
Top achievements
Rank 1
Share this question
or