Telerik

Forums

Skip Navigation LinksHome / Community / Forums / Reporting > Telerik Reporting > NeedDataSource event not firing when updating the ReportViewer

Not answered NeedDataSource event not firing when updating the ReportViewer

Feed from this thread
  • Charles avatar

    Posted on Jul 8, 2009 (permalink)

    Hello,

    I upgraded to Telerik Reporting Q2 2009 and my reports are encountering an issue. I have a button on the page that sets the parameters for the report and updates the ReportViewer. However, since I upgraded to Q2 the NeedDataSource event is not firing. If I use Q1 it works fine. I have to use Q2 because Q2 has a fix regarding the page count issue.

    ASPX:
    1) the aspx has checkboxes and dropdowns so the user can have different options when running the report.
    2) View Report button that when clicked assigns the report parameters and sets the report to the reportviewer, just like the examples.

    Report NeedDataSource:
    Here I would dynamically get the data and show or hide sub reports based on the parameters that were passed. I would also be able to store the previous datatable/dataset by using a global variable so that I could reuse some data if there were no change, and only generate new data that is needed.

    As with Q2 the NeedDataSource event is only fired the first time the button is pressed. The second time the button is pressed, I only get to :

    Public Sub New()
            InitializeComponent()
    End Sub

    I have also tried : Me.DataSource = Nothing after InitializeComponent() but that didnt help.

    Thanks for any assistance.

    Reply

  • Posted on Jul 9, 2009 (permalink)

    I have the same issue , NeedDataSource evnet doesn't fired when i click refreh after change my report parameters .
    here is my code snippet

    1         private void Default_NeedDataSource(object sender, EventArgs e) 
    2         { 
    3            this.reportTotalAnnualSalaryPerEmployeeTableAdapter1.Fill( 
    4                   this.totalPayrollPerEmployeeDataSet.ReportTotalAnnualSalaryPerEmployee, 
    5                 reportParameter["Year"as int?, reportParameter["Employee"as Guid?); 
    6              
    7             this.DataSource = this.totalPayrollPerEmployeeDataSet.ReportTotalAnnualSalaryPerEmployee; 
    8         } 
     
    please i need  help..

    Reply

  • Telerik Admin admin's avatar

    Posted on Jul 13, 2009 (permalink)

    Hi guys,

    We've not been able to reproduce the issue you describe. Find attached a sample project where you can set report parameters from both the built-in report parameters UI and directly from your .aspx page on a button click event handler. Give it a spin and let us know what differs in your case.

    Best wishes,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Attached files

    Reply

  • Charles avatar

    Posted on Jul 15, 2009 (permalink)

    Thanks Steve, you had given me a fix in the Support ticket I had sent in.

    If anyone else is looking for an answer:

    In the aspx.cs page:

    ReportViewer1.Report = null;
    ReportViewer1.Report = report;

    Reply

Back to Top

Skip Navigation LinksHome / Community / Forums / Reporting > Telerik Reporting > NeedDataSource event not firing when updating the ReportViewer
Related resources for "NeedDataSource event not firing when updating the ReportViewer"

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.