2

I apologize in advance for posting this type of question again, I know others have asked but when I try those solutions, it doesn't fix my problem.

This is what I'm trying to accomplish: I have custom report(several really) that I want to run contextually on a custom entity called Benefit. Each report contains a sub report. Reports were developed using VS2008 BIDS.

There are four entities on the report; benefit(main entity), account, programYr, lineItemDetails(sub report linked by benefitId)

The problem is that the report doesn't filter properly, it give me all the benefits, not the current record.

The main report fetchxml query is below. I removed attribute fields to make it easier to read

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="vsi_benefit" alias="benefit" enableprefiltering="1"           prefilterparametername="CRM_Filteredvsi_benefit">
    <attribute name="vsi_benefitid" />
    <attribute name="vsi_approvalstatus" />
    <attribute name="vsi_participantprogramyearid" />
    <order attribute="vsi_name" descending="false" />
    <filter>
    <condition attribute="vsi_benefitid" operator="eq" value="Parameters!CRM_FilteredBenefit.Value"/>
    </filter>
    <link-entity name="vsi_participantprogramyear" from="vsi_participantprogramyearid" to="vsi_participantprogramyearid" alias="participantprogramyear">
    <attribute name="vsi_programyearid" />  
  <link-entity name="account" from="accountid" to="vsi_participantid" alias="participant">
    <attribute name="vsi_pin" />        
  </link-entity>
</link-entity>    

So the problem is that I get all the benefits, not the current one. I've tested just using the benefit entity in a simple report and I get the same results, all the benefits.

I'm hoping someone will be able to help solve this.

Thanks!

gswanson
  • 372
  • 2
  • 3
  • 13

1 Answers1

0

Could it be that your definition of the prefilterparamtername is different different from your usage of it in the condition filter:

prefilterparametername="CRM_Filteredvsi_benefit"

condition attribute="vsi_benefitid" operator="eq" value="Parameters!CRM_FilteredBenefit.Value"

EDIT: Microsoft has some guidance on prefilterparametername here. If you are intending to use that automatic prefiltering in the report parameters you need to confirm your RDL to confirm you have setup your queryParameters and ReportParameters to match the prefilterparametername. Can you post the queryparameters and reportparameters sections of your rdl?

BenPatterson1
  • 1,482
  • 12
  • 15
  • Thanks for the reply Ben. The condition statement shouldn't have been included when I pasted the code. It's inclusion is a mistake. All the examples I've seen of using prefiltering there is no condition statement. – gswanson Mar 02 '12 at 17:34
  • I hadn't seen that before but figured that could have been a feature. Bad assumption! I added an edit with some other thoughts on how we can figure it out. – BenPatterson1 Mar 02 '12 at 18:44
  • Hi Ben, We found the solution to this issue. It was a problem using an alias. Once we removed the alias field it now works. – gswanson Mar 02 '12 at 21:40