CRM 是否可以将实体实例的 ID 传递给报表?
我有一个通过 CRM 部署的 SSRS 报告,旨在显示仅与单个实体实例(在本例中为个人帐户)相关的信息。我知道我可以使用预过滤,还可以将报告的设置更改为仅显示在“相关记录类型的表单”上。
然而,当使用预过滤时,即使从特定实体的形式生成报告,用户仍然可以编辑过滤器,以便报告可能尝试显示多个实体实例的信息。有没有什么方法可以让 CRM 将实体 ID 传递到报表或锁定过滤条件,以便用户不可能让报表尝试选择多于 1 条记录?我知道我可以在查询中使用“top 1”之类的东西,但这看起来有点笨拙。此外,由于报表仅显示与单个实体记录相关的信息,因此拥有允许选择多个记录的过滤器没有多大意义。例如,允许用户定义过滤器来选择“过去 30 天内修改的所有帐户”之类的内容根本没有任何意义,因为报告应该只显示单个帐户的数据。
如果这是一个典型的 SSRS 报告,我只需定义一个“id”报告参数并将其传递到 URL 查询字符串中,但不幸的是 CRM 无法让您灵活地执行此类操作。
I have an SSRS report, deployed via CRM, that is meant to display information only related to a single entity instance (in this case, an individual Account). I am aware that I can use pre-filtering and also change the settings of the report to only display on "forms for related record types".
However, when using pre-filtering, even when generating the report from the form of a specific entity, the user can still edit the filter so that the report could potentially attempt to display information for more than one entity instance. Is there any way to either get CRM to pass the entity ID to the report or to lock down the filter criteria so that it would be impossible for the user to make the report try to select more than 1 record? I know I could use something like "top 1" in my query, but this just seems kind of clunky. Also, since the report is meant to only display information related to a single entity record, having a filter that would allow for multiple records to be selected just doesn't make a lot of sense. For example, allowing the user to define a filter to select something like "all Accounts modified in the last 30 days" makes no sense at all, because the report should only be displaying data for a single account.
If this were a typical SSRS report, I would simply define an "id" report parameter and pass it in the URL query string, but unfortunately CRM doesn't give you the flexibility to do something like this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有几种方法可以做到这一点,您已经提到了一种方法,那就是在查询字符串中传递 ID。您需要创建一个带有 JavaScript 链接的 ISV 按钮,该链接获取 crmForm.ObjectId,然后打开一个新窗口,并将值附加到报告 URL。
我还通过创建一个 aspx 页面来进行过滤并返回 PDF 报告来完成此操作。无论哪种方式都有效。
There are a few ways to do this and you've already mentioned one, which is to pass the ID in the querystring. You'll need to create an ISV button with a javascript link that grabs the crmForm.ObjectId and then opens a new window with the value appended to the report URL.
I've also done this by creating an aspx page to do the filtering and return a PDF of the report. Either way works.