【问题标题】:In SSRS, is it possible to make a context sensitive report containing multiple subreports for dynamics CRM 2011在 SSRS 中,是否可以为动态 CRM 2011 制作包含多个子报表的上下文敏感报表
【发布时间】:2012-01-16 12:27:52
【问题描述】:

我设计了一个包含多个子报告的 SSRS 报告。该报告工作正常,但显示所有记录的数据。 但我需要让它区分上下文。

以下是主报告的查询。

SELECT Filterednew_franchisee.new_franchiseeid, 
  Filterednew_franchisee.new_name, 
  Filterednew_monthlypayment.new_insurance
FROM Filterednew_franchisee 
INNER JOIN Filterednew_monthlypayment 
ON Filterednew_franchisee.new_franchiseeid = 
  Filterednew_monthlypayment.new_franchiseeid
WHERE (Filterednew_monthlypayment.new_yearmonth = 
  @reportyear + @reportmonth) 
AND (Filterednew_franchisee.new_franchiseeid IN 
  (select new_franchiseeid 
    from Filterednew_franchisee as CRMAF_Filterednew_franchisee))

子报表使用上述查询中的字段作为参数。

我错过了什么吗?还有其他需要遵循的方法吗?真的可以设计一个包含多个子报表的上下文相关报表吗?

请帮忙。

【问题讨论】:

    标签: reporting-services dynamics-crm-2011


    【解决方案1】:

    是的,上下文相关的报告是可能的。 Filterednew_franchisee 中的名称 Filtered 指的是为安全角色而设计的 SQL Server 视图。要访问上下文相关视图,请the API takes an arbitrary prefix called CRMAF_ and translates it into a context-sensitive query

    谢天谢地,SDK includes a sample 视图(我已在下面复制)。

    SELECT 
        CRMAF_FilteredActivityPointer.activitytypecodename as activitytypecodename,
        CRMAF_FilteredActivityPointer.regardingobjectidname as regardingobjectidname,
        CRMAF_FilteredActivityPointer.subject as subject,
        CRMAF_FilteredAccount.name
    FROM FilteredActivityPointer AS CRMAF_FilteredActivityPointer
        INNER JOIN FilteredAccount As CRMAF_FilteredAccount on
            CRMAF_FilteredAccount.accountid =
            CRMAF_FilteredActivityPointer.regardingobjectid
    

    【讨论】:

    • 彼得,我用同样的方法试过了。但是没有用。仍在“运行所有记录”下显示我的报告。仅供参考,我以与您提到的相同的方式完成了其他报告工作正常,并且也出现在“运行选定记录”下。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多