如何使用C#在主crystalreport中调用子报表 [英] how to call subreport in main crystalreport using c#
本文介绍了如何使用C#在主crystalreport中调用子报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我开发了一个主报告,并使用存储在C#代码中的proc基于日期参数调用它.
现在想调用子报表,以便在C#中提及任何代码,或者由
自动调用
主报告存储的proc任何机构都可以帮助我解决这个问题
Hello everybody
i developed a main report and call it based on date parameter using stored proc in c# code.
now iwant to call sub report so any code is mention in c# or it automatically call by
main reoport stored proc any body help me in this
推荐答案
请注意一下,
Please look on that,
ReportDocument myreport = new ReportDocument();
myreport.Load("C:\MyReport.rpt");
ReportDocument subreport = myreport.SubReports[0];
DataSet subds = GenerateReportData(subreport.name)
myreport.SubReports[0].SetDataSource(subds);
您只需使用共享变量"进行检查在水晶报表中
you just check it with "Shared Variables" in crystal report
这篇关于如何使用C#在主crystalreport中调用子报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文