如何将存储过程结果集列添加到Typed数据集,并将该数据集添加到RDLC文件? [英] how to add stored procedure result set columns to Typed dataset and this dataset to RDLC file?

查看:123
本文介绍了如何将存储过程结果集列添加到Typed数据集,并将该数据集添加到RDLC文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

到现在为止,我以前一直在设计RDLC文件并分配类型化的数据集表列.报表处理模式是本地的.但是现在我的存储过程会根据条件返回不同的列,即列并非每次都固定.现在,我需要将该列添加到类型化数据集,并将数据集分配给RDLC文件.因此,将基于存储过程结果集列动态创建数据集和RDLC文件.

谁能告诉我该怎么做?

在此先感谢.

问候,

N.SRIRAM

Hi All,

Till now I used to design RDLC file before and assigned typed dataset table columns.Report processing mode is local. But now my stored procedure returns different columns based on condition i.e columns are not fixed every time. Now I need to add that columns to typed dataset and dataset is assigned to RDLC file. So dataset and RDLC files are create dynamically based on stored procedure result set columns.

can anyone please tell me how to do this?

Thanks in Advance.

Regards,

N.SRIRAM

推荐答案

Sriram,
你在吗?

这就是所谓的动态报告,您可以阅读我的博客文章:

SQL Server Reporting Services 2008中的动态报告


希望对您有所帮助.
Hi Sriram,
Are you there?

This is something called dynamic reports, you can read my blog post:

Dynamic Reports in SQL Server Reporting Services 2008


Hope this helps.


在报表中使用表达式来控制内容和报表外观.表达式用VB编写.

看一下例子

= IIF(Fields!Department.Value =开发","EmployeeReport",什么都没有)


这是什么:测试Department字段的值并返回子报表名称或null(在Visual Basic中为Nothing).

这样,您可以根据表达式中的条件分配数据集或要报告的列.


希望您对本文有所了解:

http://msdn.microsoft.com/en-us/library/ms157328.aspx [ ^ ]
Use Expressions in reports to control content and report appearance.Expressions are written in VB.

Take a look at the example

=IIF(Fields!Department.Value = "Development", "EmployeeReport", Nothing)


What this does is : Test the value of the Department field and return either a subreport name or a null (Nothing in Visual Basic).

Like this,based on conditions in expressions,you can assign the dataset or the columns to report .


Hope you get an idea with this article:

http://msdn.microsoft.com/en-us/library/ms157328.aspx[^]


这篇关于如何将存储过程结果集列添加到Typed数据集,并将该数据集添加到RDLC文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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