Problem passing in report parameters for textboxes

4 posts, 0 answers
  1. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 31 Jul 2009 Link to this post

    I am having an issue that I cannot seem to figure out.

    I have a report that has code in the needdatasource event that updates three textboxes in the report.  I have setup the report and in the preview it renders correctly.  however, once I add a reportviewer to the page and set the report parameters, the report renders the details section just fine and it is based upon the parameters I passed in.  But the textboxes being set in the needdatasource event are not updated.  If I hit the refresh button on the reportviewer, it is then updated.

    Any ideas on where I should be updating the textboxes?
  2. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 31 Jul 2009 Link to this post

    I resolved my problem by moving the textbox population from the code behind to using report parameters.  This means that I shifted the logic from the report to the page that calls the report via the report viewer.  I now apply my business rules outside the report itself.  Not sure that I like this, but it works.

    Any other ideas?
  3. DevCraft banner
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Aug 2009 Link to this post

    Hello Terry,

    Are those textboxes located in the Page sections (Page Header/Footer by any chance)? If so, then you won't be able to set their values in NeedDataSource in the current version. However we've changed that behavior and you would be able to in the Q2 SP1 expected this week.

    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.
  5. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 03 Aug 2009 Link to this post

    Hello Steve,

    Yes, these were in the Page Header section.  It is good to hear that you will be adding this functionality.  I will try it out once it is released.

    Thanks,

    Terry Webster
Back to Top