Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Custom report issue when uploading to CRM

Posted on by Microsoft Employee

Hello,

I have written a custom report with VS2016 with SQL based query with SSRS. All is ok when I run the report or publish it to Reportservices I can see the report and charts.

When I try to copy RDL file and upload into CRM application and run in through there, I get an error:

Reporting Error

The report cannot be displayed. (rsProcessingAborted)

In the eventlog I can see an error:

Report data set execution failure. Error: The SELECT permission was denied on the object 'SalesOrder', database 'CRM_MSCRM', schema 'dbo'.

My question is, while I have imported the RDL file in to the CRM, which user is trying to query sql server?

*This post is locked for comments

  • ram r Profile Picture
    ram r on at
    RE: Custom report issue when uploading to CRM

    It depends on the scenario, I would prefer SQL for complex queries and Fetch for simple queries.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom report issue when uploading to CRM

    Just asking, isn't it better to write FetchXML instead of SQL-based query?

    I want to be able to sum, add and calculate somenumbers received from the query.

    I'm new at creating custom reports with SSRS.

    Thanks

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Custom report issue when uploading to CRM

    Hi

    If you give read access to the User in SQL, the user would be able to see all the data.

    If you use filtered view then the User would be able to see the data only allowed for the user.

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Custom report issue when uploading to CRM

    Please refer the following:

    technet.microsoft.com/.../dn531161.aspx

    technet.microsoft.com/.../dn531182.aspx

  • Suggested answer
    Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Custom report issue when uploading to CRM

    Filtered views respect permissions scoping of CRM to the user running the report.  If you open up SSRS, instead of looking at the tables on the CRM database, look to the Views.  You'll see the regular views, and then the ones listed as "filtered".  You can't query it exactly like a table, so you'll have to update your query a little as well.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom report issue when uploading to CRM

    Hi, Thanks for replies,

    After providing the user account of SQL Server Reporting Services (MSSQLSERVER) Read access the SQL database, the report is now showing.

    But I'd appreciate any best practice for custom reports if the method I'm using is ok or not.

  • Suggested answer
    ram r Profile Picture
    ram r on at
    RE: Custom report issue when uploading to CRM

    Filteredsalesorder is a view, Its a best practice to use filtered views in your report queries. If you still face permission issues, then the gap is with security role.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom report issue when uploading to CRM

    Hi,

    What is a filtered view? I changed it to FilteredSalesOrder but that table does not exist!

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Custom report issue when uploading to CRM

    Hi

    Try with Filtered views (FilteredSalesOrder) instead of the table SalesOrder

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans