如何在同一个应用程序中的rdlc报告中调用C#方法。 [英] How to call C# Method in rdlc report in same application.

查看:109
本文介绍了如何在同一个应用程序中的rdlc报告中调用C#方法。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,



我的Windows应用程序部署在客户机上。



该应用程序包含很少的报告,为此我在同一个应用程序中使用rdlc报告。



现在我需要从同一个应用程序访问一个公共方法报告显示计算数据。



由于方法过于复杂(使用许多系统组装功能),因此无法在报告的代码选项卡中添加。 br />


在这里,我没有不同的报告服务。报告是申请的组成部分。



请尽快建议。



谢谢,

Abhishek



I've a windows application which gets deployed on client machines.

The application comprises of few reports, and for that I'm using rdlc report in the same application.

Now i need to access a public method from the same application in report to display calculated data.

Since the method is too complex (uses many system assembly functions), it can't be added in code tab of the report.

Here, I do not have a different reporting service. Reports are the integral part of the application.

Kindly suggest asap.

Thanks,
Abhishek

推荐答案

计算C#中的数据并将其作为参数传递给报表(设置您使用reportViewer的参数)
Calculate the data in C# and pass it to reports as a parameter (Setting the parameter where you are using reportViewer)


create and用您的函数编译一个dll,需要在rdlc中导入以处理数据

然后

在报告中使用visual studio打开项目中的report.rdlc菜单打开报告属性然后添加你创建的dll的引用



现在你可以使用该函数进一步参考了解link [ ^ ]
create and compile a dll with your function that need to be imported in the rdlc to process the data
then
open the report.rdlc in the project using visual studio now in the report menu open the report properties then add the reference of the dll you created

that's it now you can use the function for further refernece see the link[^]


这篇关于如何在同一个应用程序中的rdlc报告中调用C#方法。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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