we have a large number of existing reports (.rdl files), the business need is to enable business users to change the text on those report directly, they don't have report designer of any sort.
我们有大量的现有报告。业务需要的是使业务用户能够直接更改报表上的文本,他们没有任何类型的报表设计器。
So requirement is to create a WPF app, that will allow user to browse to one of those reports, display them in readable format (not as xml but formatted similar to what the real report looks like, as if they are opened in the designer), and then allow user to update the text (essentially the contents inside those tags), and save the report. so when it's ran it'll reflect those title, heading, text etc. changes.
所以要求是创建一个WPF应用程序,允许用户浏览一个报告,显示它们在可读的格式(而不是xml格式类似于真正的报告是什么样子,好像他们是在设计器中打开),然后允许用户更新文本(这些标签内主要的内容),并保存报告。所以当它运行时,它会反映标题,标题,文本等变化。
Did some research there are something like ReportViewer, Syncfusion reportviewer that can take care of displaying part in WPF, but none of them seems to allow user to edit and save.
做了一些研究,比如ReportViewer, Syncfusion ReportViewer可以处理在WPF中显示部分,但是它们似乎都不允许用户编辑和保存。
Are there any suggestions on what are the options to achieve this? I am thinking creating some mapping/translating between those xml tags and html so the content can be displayed in a readable format, and put those user editable fields in array of values to keep track of changes and replace back to the original .rdl file. but that all seem too complicated and also performance can be a concern...there should be a better way!
对于实现这一目标有什么建议吗?我正在考虑在这些xml标记和html之间创建一些映射/转换,以便以可读的格式显示内容,并将这些用户可编辑字段放在值数组中,以跟踪更改并将其替换回原始的.rdl文件。但是,这一切看起来太复杂了,而且表现也可能令人担忧……应该有更好的办法!
your help is greatly appreciated!
非常感谢您的帮助!
1 个解决方案
#1
0
Instead of having these values stored inside the report, I would store them in the database. Don't have any static values in the report. Everything shown in the report is loaded as paramters that can be configured.
与其将这些值存储在报表中,不如将它们存储在数据库中。报表中没有任何静态值。报告中显示的所有内容都是可以配置的参数。
This way you can create a UI that allows you to change the values of these configurations and a button to load the report viewer with a fresh version of the report using these values. This wouldn't be a full on report editor but if you created some base templates that meet the business needs, they'd be able to make some general modifications to the report such as Titles, alignment, logos, etc.
通过这种方式,您可以创建一个UI,允许您更改这些配置的值,并创建一个按钮,使用这些值向报表查看器加载报表的新版本。这并不是一个完整的报表编辑器,但是如果您创建了一些满足业务需求的基本模板,它们将能够对报表进行一些一般性的修改,如标题、对齐、标识等。
#1
0
Instead of having these values stored inside the report, I would store them in the database. Don't have any static values in the report. Everything shown in the report is loaded as paramters that can be configured.
与其将这些值存储在报表中,不如将它们存储在数据库中。报表中没有任何静态值。报告中显示的所有内容都是可以配置的参数。
This way you can create a UI that allows you to change the values of these configurations and a button to load the report viewer with a fresh version of the report using these values. This wouldn't be a full on report editor but if you created some base templates that meet the business needs, they'd be able to make some general modifications to the report such as Titles, alignment, logos, etc.
通过这种方式,您可以创建一个UI,允许您更改这些配置的值,并创建一个按钮,使用这些值向报表查看器加载报表的新版本。这并不是一个完整的报表编辑器,但是如果您创建了一些满足业务需求的基本模板,它们将能够对报表进行一些一般性的修改,如标题、对齐、标识等。