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

How to use an expression in a table header

1 Answer 234 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 22 Jul 2014, 04:53 AM

Hello,
I have a table in a report where the text of the header of one column must contain an expression. The problem is that the DataSource of the table is set to the table data. So how can I accomplish this?

Detailed information:
1. The table contains a ranking.
2. The table contains one column with amounts (earnings for the team).
3. The currency of the amounts is set at a higher level (tournament). It depends on the place where the tournament is played.
4. I would like the header to display Prize (EUR) or Prize (USD)
Currently this is done by code, but I would like to know if it's possible to do it with an expression.

Patrick

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 24 Jul 2014, 01:11 PM
Hello Patrick,

You can use the ReportItem.DataObject property in order to retrieve data fields from the report data source and use them in the scope of a Table item.

For more information, please refer to the How to use the ReportItem.DataObject property in expressions help article.

The attached sample report demonstrates the above suggestion in the context of the described Tournament scenario.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Nasko
Telerik team
Share this question
or