locked
Generating report error in CRM 2011: The SELECT permission was denied RRS feed

  • Question

  • Hello all,

    I've write a report and execute OK on my VMWare.

    But when it deploy on production environment. The report can not be generated.

    The error log is below:

    Microsoft.Reporting.WebForms.ReportServerException: An error occurred during the processing of thereport. (rsProcessingAborted) ––– Microsoft.Reporting.WebForms.ReportServerException: failed toexecute the query for the dataset ' Dataset1. (rsErrorExecutingCommand)

    ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: Une erreur s'est produite lors du traitement du rapport. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: Une erreur s'est produite lors du traitement du rapport. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Échec de l'exécution de la requête pour le dataset 'DataSet1'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: 
    System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'Contact', database 'X', schema dbo

    Do you all have any idea, please?

    Thanks


    If my question/answer can help you, please give me a points :) ----You may be disappointed if you fail, but you are doomed if you don't try---


    • Edited by AnyMi Tuesday, August 26, 2014 8:35 AM
    Tuesday, August 26, 2014 8:34 AM

Answers

  • Hi AnyMi,

    Any specific reason you are using POA? Filtered view will automatically take care of applying the security for you. So the user who runs the report will see only the records that he is supposed to see based on his security roles/shared records

    Regards,

    Jithesh

    • Marked as answer by AnyMi Tuesday, August 26, 2014 11:20 AM
    Tuesday, August 26, 2014 11:03 AM

All replies

  • hi,

    you are not supposed to directly query the tables. Use filtered views instead - so your contact needs to be replaced with filteredcontact.

    regards,

    Jithesh

    Tuesday, August 26, 2014 8:37 AM
  • Hello,

    This is my sql dataset

                         Select * from FilteredListMember AS L WHERE l.listid = 'xxx' AND
                          l.ListId IN
                              (SELECT     POA.ObjectId
                                FROM          PrincipalObjectAccess AS POA INNER JOIN
                                                       SystemUserPrincipals AS sup ON POA.PrincipalId = sup.PrincipalId
                                WHERE      (POA.ObjectTypeCode = 4300) AND (POA.AccessRightsMask | POA.InheritedAccessRightsMask & 1 = 1)))

    PrincipalObjectAccess seem does not have FilteredPrincipalObjectAccess view ?

    Thanks,


    If my question/answer can help you, please give me a points :) ----You may be disappointed if you fail, but you are doomed if you don't try---

    Tuesday, August 26, 2014 10:57 AM
  • Hi AnyMi,

    Any specific reason you are using POA? Filtered view will automatically take care of applying the security for you. So the user who runs the report will see only the records that he is supposed to see based on his security roles/shared records

    Regards,

    Jithesh

    • Marked as answer by AnyMi Tuesday, August 26, 2014 11:20 AM
    Tuesday, August 26, 2014 11:03 AM