Hi, i have a problem if i want to set subreport parameters and bindings at the same time from master report. Subreport parameters i set from designer, selecting "ReportSource" and than "Edit parameters". Subreport bindings I also set from designer (Poperty path: ReportSource, Expression: = GetReportSource(Fields.NestedClass) ). GetReportSource is method in master report .cs file:
When i fire my report i get exception "An error has occurred while processing the report. Processing canceled. Check the InnerException for more information. Invalid value of report parameter 'Title'." Parameter has null value (if i set in subreport "Allow Nulls" for parameter) report is showing.
If I remove parameter, data in subreport is well binded, and report shows properly. Also if I remove bindings report is showing properly and parameter has value.
public
static
ReportSource GetReportSource(
object
dataObject)
{
var report =
new
TextReport();
report.DataSource = dataObject;
return
new
InstanceReportSource { ReportDocument = report };
}
When i fire my report i get exception "An error has occurred while processing the report. Processing canceled. Check the InnerException for more information. Invalid value of report parameter 'Title'." Parameter has null value (if i set in subreport "Allow Nulls" for parameter) report is showing.
If I remove parameter, data in subreport is well binded, and report shows properly. Also if I remove bindings report is showing properly and parameter has value.