从Crystal Reports的子报表中获取FieldObjects. [英] Get FieldObjects from a subreport in Crystal Reports.
本文介绍了从Crystal Reports的子报表中获取FieldObjects.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我制作了一个程序,可以从.rpt文件中提取所有ReportObjects.为此,我使用以下代码:
Hi All,
I made a program that extracts all the ReportObjects from the .rpt files. For that I use this code:
ReportDocument objReportDocument = new ReportDocument();
objReportDocument.Load(FileName);
ReportObjects ReportObjects = objReportDocument.ReportDefinition.ReportObjects;
,效果很好.现在的问题是,有些报表文件包含子报表,而我无法从子报表中提取ReportObjects.因此,如果有人知道从子报表中获取ReportObjects的方法,请plz帮助.
附注:我使用CrystalDecisions命名空间来做到这一点.
在此先谢谢您..
,which is working perfectly fine. Now the problem is that there are some report files which have subreports and I am not able to extract the ReportObjects from subreports. So if anyone know the way to get the ReportObjects from subreports, plz help.
P.S.: I used CrystalDecisions namespace to do that.
Thanks in Advance..
推荐答案
谢谢你们,
得到了解决方案.
Thanks Guys,
Got the Solution.
SubreportObject objSubReportObject = (SubreportObject)objReportObject;
ReportDocument objSubReportDocument = objSubReportObject.OpenSubreport(objSubReportObject.SubreportName);
查看此链接
http://csharp.net-informations.com/crystal-reports/csharp- crystal-reports-subreports.htm [ ^ ]
see this link
http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-subreports.htm[^]
这篇关于从Crystal Reports的子报表中获取FieldObjects.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文