CRM 2011 和 SSRS - 为单个记录生成报告

发布于 2024-11-27 13:25:17 字数 140 浏览 1 评论 0原文

是否有可能使用 CRM 2011 和 SSRS 生成单个记录的报告,并且仅获取该记录的结果?

编辑
附加信息 - 必须使用:
自定义 SSRS 报告
CRM 中的自定义实体

Is it at all possible using CRM 2011 and SSRS to generate a report on a single record, and only get results for that one record?

EDIT
Additional Info - Must Use:
Custom SSRS report
Custom entity in CRM

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你的笑 2024-12-04 13:25:17

以下是您的问题的更具体链接:

以下链接描述了两种类型的预过滤器(CRM 4.0,但理论适用于 CRM 2011):链接。以下是 CRM 2011 中预过滤的示例:链接

我已经在 CRM 2011 中成功完成了此任务,在 BIDS 中针对自定义实体制作了完全自定义的报告,并且具有完全的上下文敏感性。

请务必学习 fetchXML,因为它将成为这些报告的未来技术。现有的报告使用 SQL,这使得它们成为难以复制的示例。

以下是有关如何从高级查找中提取 fetchXML 的示例: 链接 它还包含有关预过滤的更多信息。

Here's a more specific link to your question: link. You're probably looking for pre-filtering (look for "3. Pre-filtering Element" in the link provided) if you want the report to be record specific (context sensitive).

Here's a link describing the 2 types of pre-filters (CRM 4.0 but the theory applies to CRM 2011): link. And here's an example of prefiltering in CRM 2011: link

I have done this successfully in CRM 2011 with a completely custom report made in BIDS, on a custom entity, with full context sensitivity.

Make sure to learn fetchXML as it's going to be the going forward technology for these reports. The existing reports are using SQL which make them bad examples to copy off of.

Here's an example on how to extract fetchXML from an advanced find: link It also has more information on pre-filtering.

风月客 2024-12-04 13:25:17

查看报告 Account Overview.rdl。它可以针对单个帐户记录或多条记录执行。

请参阅使用 Microsoft SQL Server Reporting Services 生成 Microsoft Dynamics CRM 报表

Take a look a the report Account Overview.rdl. It could be executed for a single account record or multiple records.

See Reporting for Microsoft Dynamics CRM Using Microsoft SQL Server Reporting Services

拥抱我好吗 2024-12-04 13:25:17
  1. 为您想要的目标环境创建与 CRM 数据库引擎的嵌入式连接。
  2. 创建嵌入数据集以查询当前记录。这会有点奇怪,因为经验会告诉您,您将获得大量记录,但由于 CRM 背后的笨拙,它实际上只会获得当前记录。例如,如果您想获取当前报价,您可以使用“SELECT quoteid FROM FilteredQuote AS CRMAF_Quote
  3. 添加一个参数来存储对您刚刚查询的实体的引用。为了与此示例保持一致,我创建了 @QuoteFilter ,它是文本类型,可以存储多个值(即使这不是我们使用它的目的),并在步骤 2 中从数据集中获取其默认值另外,可能应该隐藏它,因为 GUID 对最终用户不友好。
  4. 最后,使用在其他数据集的 where 子句中发现的参数。例如,搜索当前报价的报价产品将类似于 SELECT * FROM FilteredQuoteDetail WHERE (quoteid = @QuoteFilter)

最后一点,您应该记住 CRM 喜欢记住一切即使你也不想要它。在我的一份报告中,我弄乱了我的数据源,CRM 始终坚信该报告应该针对所有记录运行。我修复了数据源,但上传报告没有触发刷新并纠正问题。最后,我从 CRM 中删除了该报告,创建了一个新报告,上传了完全相同的文件,没有进行任何更改,一切正常。去算算吧。

  1. Create an embedded connection to the CRM database engine for the environment you want to target.
  2. Create an embedded dataset to query the current record. This going to be kind of weird since experience will tell you that you are going to get tons of records, but because of the clunkiness behind CRM it will actually only get the current record. For example, if you wanted to get the current quote you would use "SELECT quoteid FROM FilteredQuote AS CRMAF_Quote"
  3. Add a parameter to store the reference to the entity you just queried. In keeping with this example I created @QuoteFilter which is type text, could store multiple values (even though that's not what we're using it for), and gets its default value from the dataset in step 2. Also, probably ought to make this hidden since GUIDs aren't end user friendly.
  4. Finally, use the parameter discovered in the where clause of the other datasets. For example, a search on quote products for the current quote would look something like SELECT * FROM FilteredQuoteDetail WHERE (quoteid = @QuoteFilter)

As a final note, you should keep in mind that CRM loves to remember everything even when you don't want it, too. On one of my reports I messed up my datasource and CRM was forever convinced that the report should run against all records. I fixed my datasource, but uploading the report did not trigger a refresh and correct the problem. In the end, I deleted the report from CRM, created a new one, uploaded the same exact file with no changes, and everything worked. Go figure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文