如何动态呈现localreport? [英] How can I render a localreport dynamically?

查看:76
本文介绍了如何动态呈现localreport?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在设计时使用设计器创建一个localreport,但它看起来并不灵活,我认为它是某种硬代码,在某些情况下,项目中的所有报告都具有相同的结构,例如一个带有下表的居中标题,如果在设计时使用硬编码,我必须为n个表创建n个报告,而如果我可以动态创建报告,它会更清晰,更容易。我想要的是如何在localreport上呈现具有各种列的表,以及如何在调用RefreshReport方法以显示报告之前在运行时将具有指定位置的文本框添加到localreport?



我先搜索过谷歌,但似乎没有人关心这个问题。非常感谢您的帮助!



谢谢!

解决方案

Rdlc文件基本上只是XML文件所以你可以很容易地生成它们。您可以在此处查看架构规范: http://msdn.microsoft.com/ en-us / library / dd297486%28SQL.100%29.aspx [ ^ ]



也许这会有所帮助:http://www.gotreportviewer.com/ [ ^ ]

I know how to create a localreport using designer at design time but it doesn''t seems flexible and I think it is some kind of hard-code, in some case all the reports in a project have the same structure for example a centered header with a table below, if using hard code at design time I have to create n reports for n tables, while if I can create a report dynamically, it ís much cleaner and easier. What I want is how to render a table with various column on a localreport, and how to add a textbox with specified location to a localreport at runtime before calling RefreshReport method to show the report?

I''ve Googled first but it seems that nobody cares about this problem. Your help would be highly appreciated!

Thanks!

解决方案

Rdlc files are basicly just XML files so you can generate them quite easily. You can check the schema specification here: http://msdn.microsoft.com/en-us/library/dd297486%28SQL.100%29.aspx[^]

Also maybe this will help: http://www.gotreportviewer.com/[^]


这篇关于如何动态呈现localreport?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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