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

Support for Fields mapped to deep object graph

6 Answers 175 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jafin
Top achievements
Rank 2
Jafin asked on 22 May 2007, 06:10 AM
Dear Telerik.

I have attemped to bind a report to a object graph using values such as:

IList<Project> list = GetProjects(); 
this.DataSource = list; 
textBox1.Value = "=Location.StationName";   

But I receive the error "The expression contains object 'Location' that is not defined in the current context".

Does Telerik Reporting allow the querying of fields in a deep object graph to be used in a report?

Thanks,
J.



6 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 23 May 2007, 02:23 PM
Hi Jafin,

Thank you for your question.

To our great regret in v1 of Telerik Reporting there is no way to bind report items to a deep object graph. The reason is that all properties of the top most object that are of complex types (type is not primitive, String, DataTime, Guid or byte[]) are discarded from the data processing engine. In your case this is the Location property. As we skip this property there is no way how to access the StationName.

Please excuse us for the inconvenience. We logged the issue in our bug tracking system and will check how to overcome this flow for the next version.
 

Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
pcrane
Top achievements
Rank 1
answered on 25 May 2007, 03:17 PM
I received the same error just trying to bind to a value coming directly out of a query.  "select Description from document_category"?

this.textBox2.Value = "=Description";

Any ideas on why I would receive that error here?

The expression contains object 'Description' that is not defined in the current context.

0
pcrane
Top achievements
Rank 1
answered on 25 May 2007, 03:47 PM
I forgot to mention that I'm using the OleDbDataAdapter for Oracle.  
0
Svetoslav
Telerik team
answered on 28 May 2007, 04:41 PM
Hello pcrane,

It seems that your problem is quite different from the one described from Jafin. You can receive a similar error if you're binding a TextBox item that resides in the PageHeader or PageFooter section to a data field. Basically, you cannot use any data field in these sections because they are processed while rendering the report when the data from the data source is not available. For the current v1 you can use data fields only in the DetailSection and GroupHeader/FooterSections.

If this is not your case, please be more specific and if possible send us your report (in a support ticket) so we be able to examine the issue and send you a resolution.
 

Best wishes,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
joshuarivers
Top achievements
Rank 2
answered on 23 Oct 2007, 03:43 AM
Has the problem of binding to a deep object graph been solved in a more recent version?
0
Accepted
Svetoslav
Telerik team
answered on 23 Oct 2007, 08:28 AM
Hi joshuarivers,

Yes the latest version of Telerik Reporting Q2 2007 supports deep object graphs and we encourage you to download the latest version and give it a try.

We will be happy to know your feedback. Thank you.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Jafin
Top achievements
Rank 2
Answers by
Svetoslav
Telerik team
pcrane
Top achievements
Rank 1
joshuarivers
Top achievements
Rank 2
Share this question
or