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

Problem passing in report parameters for textboxes

3 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Terry Webster
Top achievements
Rank 2
Terry Webster asked on 31 Jul 2009, 05:25 AM
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?

3 Answers, 1 is accepted

Sort by
0
Terry Webster
Top achievements
Rank 2
answered on 31 Jul 2009, 08:08 PM
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?
0
Steve
Telerik team
answered on 03 Aug 2009, 12:35 PM
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.
0
Terry Webster
Top achievements
Rank 2
answered on 03 Aug 2009, 02:40 PM
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
Tags
General Discussions
Asked by
Terry Webster
Top achievements
Rank 2
Answers by
Terry Webster
Top achievements
Rank 2
Steve
Telerik team
Share this question
or