简体   繁体   English

使用SSRS的Dynamics CRM 2011报表的子报表问题

[英]SubReport Issue with Dynamics CRM 2011 Reports using SSRS

I am trying to add a simple subreport to a report in Reporting Services using Dynamics CRM (FetchXML). 我正在尝试使用Dynamics CRM(FetchXML)将简单的子报表添加到Reporting Services中的报表中。 This is all on my local machine, neither report has been published yet. 这些全部在我的本地计算机上,尚未发布任何报告。 I am only trying to get them to run in Reporting Services. 我只是想让它们在Reporting Services中运行。 I added a Parameter to the subreport for the field "name". 我在子报表中为“名称”字段添加了一个参数。 I then added a subreport to the main report. 然后,我在主报表中添加了一个子报表。 I then selected the subreport via subreport properties and passed the parameter here as well. 然后,我通过子报表属性选择了子报表,并在此处也传递了参数。

Here is the FetchXML from the Main Report 这是主报告中的FetchXML

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="account">
    <attribute name="name" />
    <attribute name="ownerid" />
    <attribute name="new_databaseserver" />
    <attribute name="new_databasename" />
    <attribute name="accountid" />
    <order attribute="name" descending="false" />
  </entity>
</fetch>

Here is the FetchXML from the subreport 这是子报表中的FetchXML

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="account">
    <attribute name="name" />
    <attribute name="accountid" />
    <attribute name="new_adam" />
    <order attribute="name" descending="false" />
  </entity>
</fetch>

Here is the error: 这是错误:

[rsErrorExecutingSubreport] An error occurred while executing the subreport 'SubReport1' (Instance: 19iT0R0x0S0): Data retrieval failed for the subreport, 'SubReport1', located at: /SubReport1. [rsErrorExecutingSubreport]执行子报告'SubReport1'时发生错误(实例:19iT0R0x0S0):位于/ SubReport1的子报告'SubReport1'的数据检索失败。 Please check the log files for more information. 请检查日志文件以获取更多信息。

I've been racking my brain over this all weekend. 这个周末我一直在绞尽脑汁。 Any help would be really appreciated. 任何帮助将非常感激。

I noticed you don't have the filter expression in subreport. 我注意到您在子报表中没有过滤器表达式。 I think reporting services tries to get all accounts data from CRM two times: for 1st report and then for subreport. 我认为报表服务会尝试两次从CRM获取所有帐户数据:第一次报表,然后是子报表。 Try use this fetch for subreport: 尝试将此提取用于子报表:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="account">
    <attribute name="name" />
    <attribute name="accountid" />
    <attribute name="new_adam" />
    <order attribute="name" descending="false" />
    <filter type="and">
       <condition attribute="name" operator="eq" value="@Name" />
    </filter>
  </entity>
</fetch>

The @Name is name of your parameter. @Name是参数的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM