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

Empty Subreport

1 Answer 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Monica
Top achievements
Rank 1
Monica asked on 11 Jun 2012, 03:29 PM
I created in my master-report this eventheandler, but error tell me (Processing.SubReport subReport = (Processing.SubReport)"sender;) dont' cast Processing.SubReport with Processing.Report.

I want view textbox13 when subreport = 0

 

 

public masterReport(string x)

 

{

InitializeComponent();

 

try

 

{

sqlDataSource1.SelectCommand =

 

".......";

 

 

 


this
.sys2.ItemDataBound += new EventHandler(sys2_ItemDataBound);

 

}

 

 

catch (Exception)

 

{

 

 

throw;

 

}

}



 

 

void sys2_ItemDataBound(object sender, EventArgs e)

 

{

Telerik.Reporting.Processing.

 

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

 

Telerik.Reporting.Processing.

 

Report report = (Telerik.Reporting.Processing.Report)subReport.InnerReport;

 

 

 

if (report.ChildElements.Find("trasmissione", true).Length > 0)

 

{

subReport.Visible =

 

true;

 

}

 

 

else

 

{

textBox13.Visible =

 

true;

 

}

}

Please, help me. Thank you

1 Answer, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 12 Jun 2012, 07:25 AM
It seems like you are doing a wrong cast. Debug and see where it is.
Tags
General Discussions
Asked by
Monica
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or