SQL Server Reporting Services - 报表模型:API(构建自定义报表生成器)
我正在研究创建自定义报告生成器和数据工具来替换 ssrs 报告生成器的想法。
我想要的东西更像是查询生成器和数据导出工具,而不是报告。
我想使用的是报告模型。 我希望用户从报告模型中选择字段,渲染 sql,然后执行 sql 并返回数据。
报表生成器如何使用报表模型? 它是否只提供架构并且报告生成器生成实际的 SQL? sql是如何生成的,服务器端还是客户端。
如何为用户提供可用的字段以及如何获取用户选择的字段的 sql?
I am looking into the idea of creating a custom report builder and data tool to replace the ssrs report builder.
I am wanting something more like a query builder and data export tool rather than reporting.
The thing I want to use is the report model. I want users to select field from report model, render the sql, then exec sql and return data.
How is the report model used by report builder?
Does it just provide the schema and the report builder generates the actual sql?
How does the sql get generated, server or client side.
How can I so the users the fields available and how can I get the sql for the fields selected by the user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我同意罗布的观点。 我认为这种努力是不值得的。
话虽如此,我可以提供一些这方面的部分信息。 使用 Report Builder 2.0 创建报表时,会在数据集中创建一个语义查询,该查询可以针对报表模型执行。
从高层来看,报表模型中的查询如下所示:
由于从报表模型报表创建的报表可以保存到报表服务器,因此可以假设报表模型是在报表服务器上处理的。 然后在 Reporting Services 服务中生成 SQL。
I agree with Rob. I don't think the effort would be worth it.
Saying that, I can provide some partial information on this. When a report is created with Report Builder 2.0, there is a semantic query that is created within the dataset that can execute against the report model.
From a high-level the query in the report model looks like it does below:
Since a report created from a report model report can be saved to the report server, it can be assumed that the report model is processed on the report server. The SQL is generated then in the reporting services service.
我真的不认为这值得做。 您最好升级到 SQL 2008 并使用 Report Builder 2.0。
但是...您可以非常轻松地使用 SSRS 提供的 Web 服务来获取报告模型的 XML,然后您可以将其用作 ORM 的一种形式,从而能够实现类似 LINQ 的环境。
我只是觉得这真的不值得。
I really don't think this is worth doing. You'd be better off upgrading to SQL 2008 and using Report Builder 2.0.
But... you can quite easily use the web services provided with SSRS to get at the XML for a report model, and you may be able to then use this as a form of ORM to be able to get a LINQ-ish environment happening.
I just don't think it's really worth it.