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

subreport.DataItem

1 Answer 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aydın Kara
Top achievements
Rank 1
Aydın Kara asked on 11 Jun 2008, 05:10 PM
Hi All,

I developed a report using telerik Q1 2008. Now I want to add a subreport to this report using the NeedDataSource event of the subreport. the code on this forum uses something similar to following:

1 SubReport subReport = (SubReport)sender;
2 (DataRowView)subReport.DataItem

But, SubReport does not have a definition for DataItem. So it results with a compilation error.Can anyone send me the code snippet to set the Datasource of the subreport.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 12 Jun 2008, 11:08 AM
Hello Hasan ARSLAN,

Please make sure that you cast the sender to the correct type which is usually from the Telerik.Reporting.Processing namespace:

Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender;

For more information please read Understanding Events.

All the best,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Aydın Kara
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Share this question
or