问题描述
BoldReports ReportViewer 控制器:
我在 OnReportLoaded() 方法中使用 ReportHelper.GetParametersWithValues() 函数来检索报告参数。它成功检索了参数列表,但是,只填充了名称属性 - 值为空。
private ReportParameterInfoCollection _rptParamColl;
public void OnReportLoaded(ReportViewerOptions reportOption)
{
_rptParamColl = ReportHelper.GetParametersWithValues(jsonArray,this,_cache);
if (_rptParamColl != null)
{
foreach (ReportParameterInfo rptParam in _rptParamColl)
{
if (rptParam.Name == "OrgID")
{
if (rptParam.Values != null )
{
// perform appropriate validation on rptParam.Values[0]
}
}
}
}
}
在上面的代码示例中,rptParam.Name 有一个值,但 rptParam.Values 为空。我知道这些值存在,因为当我检查 jsonArray 对象时,它们在那里(虽然奇怪的是,在调用 ReportHelper.GetParametersWithValues() 之后,jsonArray 对象被清除了?调用 ReportHelper.GetDataSources() 时也会发生同样的情况。这也是一个问题,因为我想调用这两种方法,在调用一个方法后,不能调用另一个...)
知道我可能做错了什么吗?
提前致谢,
布拉德
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)