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

Get values from a crosstab

1 Answer 217 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 19 Oct 2011, 11:21 PM
Hi,

I have a report containing a crosstab, which works fine.  Because my data structure is defined, I know exactly how many rows and columns of data my crosstab will contain.

Now, in code I want to take the values from the crosstab and use them to set the sizes of some pre-defined shapes on the report.  How can I iterate through the cells in the crosstab to get hold of these values, and which event handler should I use (I am assuming crosstab1_ItemDataBound).

Alternatively (and this was my first idea) I could get the data values from the data source of the report itself, but I have not been able to work out how to get hold of this and cast it into a data object which I can iterate through.  Is it possible to do this kind of thing in the report's ItemDataBinding or ItemDataBound events, for example?

Thanks,

Michael

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 24 Oct 2011, 05:54 PM
Hello Michael,

In the report items ItemDataBound you can retrieve the parent data item data object. Thus our suggestion is to use crosstab textbox ItemDataBound. You may find useful the Report Events help article.

Generally the report items Size property support Bindings thus you can alter the report items size with an user function based on report data.

Best wishes,
Peter
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or