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

Passing DataSet To Telerik Repot to Fill TextBoxes

1 Answer 203 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 25 Jun 2009, 07:50 PM
I'm trying to pass a DataSet with two Data Tables to fill text boxes in the report header and report lines of the report.  When I step the code and do a watch on the report, the text values are showing the correct values from the dataset, but when the report is displayed on my web form they are not there.  It will just use the value of the textbox frpm design time?  How do I get the report viewer to display the report with updated textbox values?  I set the a report object equal to the method to update the textboxes that returns the updated report, then set that to the reportviewer's report property as I've seen in examples, but the textbox values are not updating?

1 Answer, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 25 Jun 2009, 08:58 PM
I figured out a way around this, at least in my header section(haven't tried the lines yet).  In the function where I was setting the Text boxes equal to the appropriate values of the dataset, now I just have two lines: Me.DataSource = myDataSet (name of dataset passed in) and then Return Me.  Then in design view I set the value of the textboxes to "=FieldName" (replacing FieldName with the name of the field I want to be displayed in the TextBox.  It works when I run it and is much simpler than the other solution I was trying.  Is this solution recommended?  I guess it will work fine as long as I name my columns consistently and make sure they are unique since I have two data tables.  Hopefully this will work for the details section too.
Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Share this question
or