使用动态布局进行报告
我们正在使用 DevExpress Xtra 报告,但它们似乎无法满足我们的要求...
我之前发布过 这个问题,没有好的答案(据我所知),甚至来自 devexpress。
我们希望有一份报告,我们可以更改其布局(基于用户的某些属性),但底层“管道”相同(例如数据源、列等,但为报告提供了不同的参数) 。
我能解释的最接近的是排序模板方法,或者想象一下应用不同的母版页。我并不追求蒙皮效果,我们的客户决定了报告的整个布局,这样一个客户的单个报告可能与另一个客户完全不同(在布局方面)。我也不想维护许多报告 - 例如,如果我添加一列,或更改报告主要部分的列上的 beforePrint 事件,我不想浏览其他文件并更改它们(一份报告可能有数百种布局)。
有谁知道有一种产品可以满足我们的要求,或者可以建议一种实现我们要求的方法吗?
We're using DevExpress Xtra reports, but they don't seem to be able to meet our requirements...
I previously posted this question, to which no good answer (that I am aware of) exist, even from devexpress.
We would like to have a report that we can change the layout of (based on some property of a user), but have the underlying 'plumbing' the same (e.g. data source, columns etc, though with different parameters provided to the report).
The closest I can explain what I'm after is a sort template approach, or imagine applying different master-pages. I'm not after a skinning effect, our customers dictate the entire layout of the report, such that a single report for one customer, may be entirely different (in terms of layout) to another customer. I also do not want to maintain many reports - e.g. if I add a column, or change the beforePrint event on a column on the main part of the report, I don't want to have to go through other files and change them as well (we could have 100's of layouts for one report).
Does anyone know of a product that would meet our requirements, or can suggest a method of achieving what we require?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我意识到您可能已经解决了这个问题,但我们所做的是序列化报告并将其保存在数据库中。用户可以将报告编辑为任何所需的布局。当新列添加到报告中时,我们会更新数据源,并且该列现在可供用户使用......如果他们愿意的话。我们只维护 1 个版本,如果需要,该版本会序列化到数据库中或仅用作基本布局(我们有多种使用报告的方式,一种只是报告,用户选择报告的布局显示(没有人使用系统副本(我们维护的副本),或者用户可能使用类似发票之类的东西,我们将加载多个报告并将它们合并到 1 个打印文件中。)
是的,有很多信息,但信息不多在代码的方式上,但是 DevExpress 非常灵活,至少在
HTH方面。
I realize that you might have already solved this, but what we did is to serialize the report and save it in the database. The user can edit the report to any layout desired. When a new column is added to the report, we update the datasource and the column is now available for the user to use...if they want to. We only maintain 1 version, and that version, if needed is serialized into the database or is just used as the base layout (we have multiple ways of using the reports, one is just a report and the user selects the layout for the report to display (none uses the system copy(our copy we maintain) or the user may be using something like an invoice where we will load multiple reports and merge them into 1 print file.)
yeah, there is a lot of information, and not much in the way of code, but DevExpress is very flexible, at least in this way.
HTH
我会看一下 Telerik 报告 http://www.telerik.com/products/reporting。 aspx
报告只是 C# 类,您可以通过在报告中编写自己的代码来轻松修改报告,例如,您还可以创建一个基类并让所有报告继承该基类。我认为您可以利用这种灵活性来满足您的需求。
I would take a look at the Telerik reporting http://www.telerik.com/products/reporting.aspx
Reports are just C# classes and you can modify the reports easily by writing your own code inside the report, you can also for instance create a base class and have all reports inherit from that. I would think you could leverage this level of flexibility to meet your needs.