C#中的子报表Crystal报表 [英] subreport crystal report in c#

查看:67
本文介绍了C#中的子报表Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发时间定义代码时,如何获取子报表texobject.
---

How to i get sub report texobject when i define code in developing time.
---

CrystalDecisions.CrystalReports.Engine.TextObject txt1= (TextObject)rpt.ReportDefinition.Sections["Section2"].ReportObjects["abc"];


听到"abc"是我无法获得texobject的子报告名称.

请帮助我.


Hear "abc" is a sub report name I can''t get texobject.

Please help me.

推荐答案

下面的代码将提供有关子报告的信息.

The below code will give information about sub report.

ReportDocument rptdoc = new ReportDocument();
 rptdoc.Load(Server.MapPath("ReportName"));
 if (rptdoc.Subreports.Count != 0)
{
                foreach (ReportDocument sub in rptdoc.Subreports)
                {
		//Here you can write a logic to get sub reports collections.
                }
 }


这篇关于C#中的子报表Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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