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

Access the values of other report items

3 Answers 645 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jota
Top achievements
Rank 1
Jota asked on 31 Jul 2012, 07:42 PM
Hi

I have a report, based on a sqlDataSource. Some textboxes get their values from this datasource.

In the same report, I have a few tables (with only one row and one column) which get the data from different sqlDataSources than the main one.

The question is... I want to add a textbox to the report, and the value it holds has to be calculated from the values on the tables... but I can´t find how to reference those textboxes inside those tables in order to fill the value in this new textbox... no matter what I do i get an error.

For example I want to reference the value held in table2 wich has a textbox named textbox14, if I reference it like- table2.textbox14.Value, or textbox14.Value or ReportItem.table2.textbox14.Value or ReportItem.table2.textbox14.Value I always get the same error "The expression contains object "table2/textbox14" that is not defined in the current context"

Can someone help me on this?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 25 Sep 2012, 06:57 PM
Did you ever find a solution to this as I am wanting to do something similar.  I think I saw in one of the tutorials that you could create a user fuction in the code behind, which is then able to be called in the expression.  Just wanted to see if you found a way.
Thank you.
0
Jota
Top achievements
Rank 1
answered on 25 Sep 2012, 08:07 PM
No I didn´t.

So if you find a way I´ll be glad to know about it.
0
John
Top achievements
Rank 1
answered on 25 Sep 2012, 08:27 PM
Here is a link to the telerik site that talks about user functions: http://www.telerik.com/help/reporting/expressions-user-functions.html.  This is what I ended up going with for right now as I am using stored procedures to access data.

Hope that helps you.
Tags
General Discussions
Asked by
Jota
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Jota
Top achievements
Rank 1
Share this question
or