private static void GetReportParameters(ReportParameterInfoCollection localReportParams, String reportParamName, String paramName, out string lrpLabel, out string lrpValue) { lrpLabel = String.Empty; lrpValue = String.Empty; if (String.IsNullOrWhiteSpace(paramName)) { paramName = reportParamName; } var localReportParamsLen = localReportParams.SafeLength(); for (int lrpIdx = 0; lrpIdx < localReportParamsLen; lrpIdx++) { var lrp = localReportParams[lrpIdx]; if (lrp.Name == reportParamName) { var vvLen = lrp.ValidValues.SafeLength(); for (int vvIdx = 0; vvIdx < vvLen; vvIdx++) { var vv = lrp.ValidValues[vvIdx]; if (vv.Label == paramName) { lrpLabel = vv.Label; lrpValue = vv.Value; break; } } } } }
private static String[] GetStandardReportParameters(ReportParameterInfoCollection localReportParams, String reportParamName) { var vals = new List <String>(); var localReportParamsLen = localReportParams.SafeLength(); for (int lrpIdx = 0; lrpIdx < localReportParamsLen; lrpIdx++) { var lrp = localReportParams[lrpIdx]; if (lrp.Name == reportParamName) { var vLen = lrp.Values.SafeLength(); for (int idx = 0; idx < vLen; idx++) { vals.Add(lrp.Values[idx]); } } } return(vals.ToArray()); }