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

ReportItemBase is read only

1 Answer 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 24 Jun 2013, 08:56 PM
I am running the following code:
and at this.TelSubRptLocations.Report = TelSubrpt; it throws the following error:
"Property or indexer Telerik.Reporting.ReportItemBase.Report cannot be assigned to -- it is read only.

so how do i get around this?
Telerik.Reporting.Report TelSubrpt = new TelSubRptContract();
((TelSubRptContract)TelSubrpt).UOM = "GAL";
((TelSubRptContract)TelSubrpt).RinsPrice = RinsPrice;
TelSubrpt.DataSource = dtLocations;
this.TelSubRptLocations.Report = TelSubrpt;

1 Answer, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 27 Jun 2013, 12:26 PM
If TelSubRptLocations is a subreport item you can set it's report with the ReportSource property:

Telerik.Reporting.Report TelSubrpt = new TelSubRptContract();
((TelSubRptContract)TelSubrpt).UOM = "GAL";
((TelSubRptContract)TelSubrpt).RinsPrice = RinsPrice;
TelSubrpt.DataSource = dtLocations;
var instanceReportSource1 = new InstanceReportSource();
instanceReportSource1.ReportDocument = TelSubrpt;
this.TelSubRptLocations.ReportSource = instanceReportSource1;
Tags
General Discussions
Asked by
William
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Share this question
or