如何通过c#获取子报告参数 [英] how to get sub report Parameters by c#

查看:100
本文介绍了如何通过c#获取子报告参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有

i在我的主报告中有一个子报告,它有一个storeProcedure作为数据源,有一个sp参数,如MyParameter。



i希望通过c#代码获取此参数,我该怎么做?



在主报告中我们可以使用下面的代码获得参数但是它会落到问题当

我们想要将此代码用于子报告!!!!!!!



hi to all
i have a subreport in my main report and it has one storeProcedure as datasource that has one sp Parameter like "MyParameter".

i want to get this parameters by c# code ,how can i do this?

in main report we can get paramters using below code but it falling to problem when
we want to use this code for subreport !!!!!!!

ReportDocument reportDocument;
 reportDocument.Load(pageObject.Server.MapPath(mainreportFilename));

foreach (CrystalDecisions.Shared.ParameterField field in reportDocument.ParameterFields)
//some code 





感谢您的帮助。



thanks for any help.

推荐答案

在主报告中
reportDocument.ParameterFields

你也可以找到其子报告的参数字段。

you can find parameter fields of its sub reports too.


reportDocument.ParameterFields[0].ReportName





将给出子报告名称



will give the sub report name


这篇关于如何通过c#获取子报告参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆