ReportViewerForMvc/ReportExtensions.cs
/// <summary>
/// Set the ReportParameter of the specified ReportParameterInfo.
/// </summary>
/// <param name="report">The Report that this method extends.</param>
/// <param name="reportParameterInfo">The ReportParameterInfor whose parameter should be added to the Report.</param>
Set the ReportParameter of the specified ReportParameterInfo.
Set the ReportParameter of the specified ReportParameterInfo .
public static void SetParameters(this Report report, ReportParameterInfo reportParameterInfo)
        {
            if (report == null)
            {
                throw new ArgumentNullException("report", "Value cannot be null.");
            }
            if (reportParameterInfo == null)
            {
                throw new ArgumentNullException("reportParameterInfo", "Value cannot be null.");
            }
            ReportParameter reportParameter = new ReportParameter(
                    reportParameterInfo.Name,
                    reportParameterInfo.Values.ToArray(),
                    reportParameterInfo.Visible);
            report.SetParameters(reportParameter);
        }
public static void SetParameters ( this Report report , ReportParameterInfo reportParameterInfo ) { if ( report == null ) { throw new ArgumentNullException ( " " , " " ) ; } if ( reportParameterInfo == null ) { throw new ArgumentNullException ( " " , " " ) ; } ReportParameter reportParameter = new ReportParameter ( reportParameterInfo . Name , reportParameterInfo . Values . ToArray ( ) , reportParameterInfo . Visible ) ; report . SetParameters ( reportParameter ) ; }
Set the ReportParameter of the specified ReportParameterInfo.
Set the ReportParameter of the specified ReportParameterInfo .
Report
this
reportParameterInfo
ReportParameterInfo
The ReportParameterInfor whose parameter should be added to the Report.
The ReportParameterInfor whose parameter should be added to the Report .
report
The Report that this method extends.
The Report that this method extends .