web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Filter SSRS Rep...
Power Apps
Unanswered

How to Filter SSRS Report on Model Driven App

(0) ShareShare
ReportReport
Posted on by 156

Hi, currently we are trying to implement a custom report using this tutorial. We were able to create and embed the SSRS report to the Model Driven App. But the problem is that at the final step, the report will display all the data from the current table, we want to apply filter to run the report for a selected record only. Is this possible ? Thank you.

I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @MinhPham96,

     

    You can add a parameter to the report, and then reference that parameter in your FetchXml filter section. Take a look at the thread below for details on what this looks like.

     

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/224300/how-to-filtered-reports-on-current-record-fetchxml

     

    You can then run the report when viewing a specific record.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • MinhPham96 Profile Picture
    156 on at

    Hi @ChrisPiasecki , Thank you for the answer, I tried to follow the guide that you sent and this is my setup

     

    First I created a Parameter called "CRM" and set the default to the field "number" in the dataset

    2021-02-03_11-45-16.png

     

    In the Report, I edit Filter in the Tablix Properties to filter the field "number" to be equal to the Parameter "CRM"

    2021-02-03_11-45-43.png

     

    When I tested on the preview, I can see the Parameter on top, when I selected the number, the report data is filtered by the selected number

    2021-02-03_11-46-00.png

     

    But when I publish the report and run the report on the Model Driven App, we cannot select the Parameter, and it always take the First number as the default value

    2021-02-03_11-46-29.png

     

    So is there anyway to set the default value of the parameter to be equal to the "number" value of the record that you are selected in the view or form ?

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @MinhPham96 ,

     

    Apologies for the late response. Also, please disregard my latest response, you don't need to manually define the parameter, so please remove that parameter.

     

    Go into your dataset properties, then query. Add the enableprefiltering="1" attribute to your FetchXML as shown below, then hit Refresh Fields.

     

    ChrisPiasecki_0-1612848792949.png

     

    It should then automatically generate a parameter similar to what you see below, with a name of CRM_<tableName>.

     

    ChrisPiasecki_1-1612848981044.png

     

    Finally, when you are uploading the report to Dataverse, ensure the Related Record Types is set to the correct table, and ensure Display In is set to Forms for related record types, similar to my example below.

     

    ChrisPiasecki_2-1612849165890.png

     

    You should then be able to open a record for your table, and in the command bar select Run Report, then see your report listed under Run on selected records.

     

    ChrisPiasecki_3-1612849339537.png

     

     

    Hope this helps.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @MinhPham96,

     

    Just following up on whether the above steps worked for you. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard