使用 rdlc 绑定子对象属性(报告) [英] Bind child object property with in rdlc (Report)

查看:58
本文介绍了使用 rdlc 绑定子对象属性(报告)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义对象说objMain",其中我有几个属性和对象类型的属性(即像子对象).

I have a custom object say "objMain" in which i have few properties and also the property of object type (i.e. like a child object).

objMain 具有以下属性:1.名称[类型:字符串]2. 说明【类型:字符串】3.开始日期[类型:日期时间]4. ObjSubject [type: object] - 这是自定义类型

objMain has these properties: 1. Name [type: string] 2. Description [type: string] 3. StartDate [type: datetime] 4. ObjSubject [type: object] - this is of custom type

ObjAddress 有这些属性1. 主题ID [类型:整数]2.主题名称[类型:字符串]

ObjAddress has these properties 1. SubjectID [type: int] 2. SubjectName [type: string]

我需要显示与该名称相关的名称、描述、开始日期和主题名称.它在 Name、description 和 startdate 字段中显示数据,但在 SubjectName 字段中不显示.

I need to display Name, description, startdate and SubjectNames related to that name. It show the data in Name, description and startdate field but not is shown in the SubjectName field.

Amod Kumar ABCDEFG 19/08/2009 物理学化学数学

Amod Kumar ABCDEFG 19/08/2009 Physics Chemistry Maths

阿莫德·库马尔 ABCDEFG 19/08/2009

Amod Kumar ABCDEFG 19/08/2009

任何人都可以告诉我我是如何做到的.我还尝试仅在表中显示 SubjectName,它在报告中不显示任何内容.我正在为报告定义两个数据源,即对于 objMain 和 ObjSubject.

Can any body tell me how i do this. I also tried to show only the SubjectName in the table, it does not show any thing on the report. I am defining both datasource for report i.e. For objMain and ObjSubject.

推荐答案

  1. 为你的基类创建一个部分类
  2. 创建一个新属性
  3. 使用嵌套对象属性在 getter 和 setter 中定义逻辑
  4. 然后像基类的任何其他属性一样将其添加到 rdlc 报告中

这篇关于使用 rdlc 绑定子对象属性(报告)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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