
Mark Bourland
Top achievements
Rank 1
Mark Bourland
asked on 25 Jun 2007, 08:46 PM
Hello,
I am using the Telerik report viewer for ASP.NET. I have a DataSet object (.xsd) that I use as the data schema for my report at design time. At runtime, I fill that DataSet via code and bind it to the report (ResumeReport is my Telerik.Reporting.Report that I'm designing):
ResumeReport report = new ResumeReport();
report.DataSource = dataSet;
report.DataMember = "Users";
reportViewer.Report = report;
reportViewer.DataBind();
I have stepped through the code in debug mode and have verified that the DataSet is populated with data. I get no build errors, but when the report tries to display, I get:
I am using the Telerik report viewer for ASP.NET. I have a DataSet object (.xsd) that I use as the data schema for my report at design time. At runtime, I fill that DataSet via code and bind it to the report (ResumeReport is my Telerik.Reporting.Report that I'm designing):
ResumeReport report = new ResumeReport();
report.DataSource = dataSet;
report.DataMember = "Users";
reportViewer.Report = report;
reportViewer.DataBind();
I have stepped through the code in debug mode and have verified that the DataSet is populated with data. I get no build errors, but when the report tries to display, I get:
"The expression contains object 'FirstName' that is not defined in the current context."
"FirstName" is a field in the "Users" table of the DataSet. I used the DataExplorer to drag the "FirstName" field on to the report, so it is just a TextBox with the value of "=FirstName". The FirstName text box is in the Details section of the report.
What am I doing wrong?
6 Answers, 1 is accepted
0
Hi Mark,
Your questions has been addressed in the support ticket you have opened on the topic. Feel free to reply there, if further assistance is needed.
Kind regards,
Hrisi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Your questions has been addressed in the support ticket you have opened on the topic. Feel free to reply there, if further assistance is needed.
Kind regards,
Hrisi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Jason Monroe
Top achievements
Rank 1
answered on 12 Jul 2007, 06:18 AM
I'm having the same issue...
What's the resolution?
What's the resolution?
0
Hi Jason Monroe,
We need some more information about your problem and if possible send us your report so we be able to reproduce and identify the issue.
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
We need some more information about your problem and if possible send us your report so we be able to reproduce and identify the issue.
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Hello Jason,
A quick followup. We were not able to reproduce Mark's problem, so we requested his project. It turned out that he was able to solve the issue by breaking up the code to fill the dataset into separate parts.
When he was setting the datasource for the report, he was also setting the datasource for all of its subreports, since they were using different tables within the DataSet object. When he moved the code to set the datasource for the subreports to the NeedDataSource methods for the subreports, it worked fine.
If this does not work for you, please open a support ticket and send us your project so that we can review it.
Greetings,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
A quick followup. We were not able to reproduce Mark's problem, so we requested his project. It turned out that he was able to solve the issue by breaking up the code to fill the dataset into separate parts.
When he was setting the datasource for the report, he was also setting the datasource for all of its subreports, since they were using different tables within the DataSet object. When he moved the code to set the datasource for the subreports to the NeedDataSource methods for the subreports, it worked fine.
If this does not work for you, please open a support ticket and send us your project so that we can review it.
Greetings,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Jason Monroe
Top achievements
Rank 1
answered on 23 Jul 2007, 10:36 PM
My problem was actually a bit differant.
On my report, I had an image box that was unbound to a data item. The erorr was being thrown when the report tried to render the image box, with no source image supplied.
Once I set the source image via created property, everything was alright. Of course, the root of the problem is that the error message had nothing to do with the origional problem. But chalking that up to beta software, I managed my work around and continued on :)
On my report, I had an image box that was unbound to a data item. The erorr was being thrown when the report tried to render the image box, with no source image supplied.
Once I set the source image via created property, everything was alright. Of course, the root of the problem is that the error message had nothing to do with the origional problem. But chalking that up to beta software, I managed my work around and continued on :)
0
Hello Jason,
Jason, we are glad to hear that you managed to solve the problem. THank you for sharing your findings in the Forum.
FYI, we are working on better error messaging, because we understand that they are a little vague. Stay tuned for further development on this topic for the September release.
All the best,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Jason, we are glad to hear that you managed to solve the problem. THank you for sharing your findings in the Forum.
FYI, we are working on better error messaging, because we understand that they are a little vague. Stay tuned for further development on this topic for the September release.
All the best,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center