My ASP.Net Core RDLC Report is working fine but tried to hide row when the field value is zero by right click the rdlc report row and then click Row Visibility. In the Row Visibility dialog box I selected Show Or Hide based on an Expression Under Change display options and used this expression
IIf(Fields!StudentAmt.Value=0,True,False)
and got the following error.
ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC30390] 'AspNetCore.ReportingServices.RdlExpressions.ExpressionHostObjectModel.DataRegionExprHost(Of TMemberType, TCellType).m_memberTreeHostsRemotable' is not accessible in this context because it is 'Friend
I am using Reference of AspNetCore.Reporting
for local Report
And this Second Error displayed as a result of this expression Format(Fields!OEndDate.Value, "MMM-yyyy")
IndexOutOfRangeException: Index was outside the bounds of the array.
My Controller
public IActionResult Report()
{
string mimtype = "";
int extension = 1;
Dictionary<string, string> parameters = new Dictionary<string, string>
{
{ "rpl", “Student Name” }
};
LocalReport localReport = new LocalReport(mypath);
localReport.AddDataSource("DataSet1", mydatasource);
var result = localReport.Execute(RenderType.Pdf, extension, parameters, mimtype);
return File(result.MainStream, "application/pdf");
}