User 'UserID' is not authorized to select a record in table 'CustDefaultLocation'. Request denied. Cannot select a record in Customer default locations (CustDefaultLocation). Access Denied: You do not have sufficient authorization to modify data in database.

Hi AX Technical,

Today, in this post we will talk about an SSRS Report Error and its solution. Please have a look at the below error:

If you are getting this below error that means you need to enable remote errors first. Please click on this link to check the solution.


Once you enable the remote errors you can check for below error solution:


Error:

User 'UserID' is not authorized to select a record in table 'CustDefaultLocation'. Request denied.
Cannot select a record in Customer default locations (CustDefaultLocation).
Access Denied: You do not have sufficient authorization to modify data in database.
(S)\Classes\xInfo\add
(S)\Classes\Info\add - line 94
(S)\Data Dictionary\Tables\CustDefaultLocation\Methods\exists - line 6
(S)\Classes\LogisticsLocationDefault\defaultExists - line 18
(S)\Classes\LogisticsLocationDefault\findSimpleDefault - line 19
(S)\Data Dictionary\Tables\SalesTable\Methods\initFromCustTableMandatoryFields - line 10
(S)\Data Dictionary\Tables\SalesTable\Methods\initFromCustTableIL - line 90
(S)\Classes\DictTable\callStatic
(S)\Classes\SysDictTable\invokeStaticMethod - line 32
(S)\Classes\SysDictTable\invokeStaticMethodIL - line 48
(S)\Classes\Global\runTableMethodIL - line 30
(S)\Data Dictionary\Tables\SalesTable\Methods\initFromCustTableServer - line 22
(S)\Data Dictionary\Tables\SalesTable\Methods\initFromCustTable - line 28
(S)\Data Dictionary\Tables\TmpCustVendTrans\Methods\custCalcSalesTotals - line 18
(S)\Data Dictionary\Tables\TmpCustVendTrans\Methods\custTransBalanceCurrency - line 80
(S)\Classes\PKA_CreditLimitBypassDP\updateBalance - line 5
(S)\Classes\PKA_CreditLimitBypassDP\insertCreditLimitBypassRecord - line 33
(S)\Classes\PKA_CreditLimitBypassDP\processReport - line 32
(S)\Classes\SrsReportProviderQueryBuilder\initialize - line 59
(S)\Jobs\

Solution:

1) Go to your report node in AOT or navigate to \SSRS Reports\Reports\Your_Report_Name\Designs\Design\Permissions\Server Methods
2) Add a new server method and fill the properties of newly created server method as below:

Class = YourDPClassName
Method = processReport
EffectiveAccess = Invoke

3) Now, navigate to \SSRS Reports\Reports\Your_Report_Name\Designs\Design\Permissions\Tables and add the tables which are having permission issue in given error. In our case we have permission issue in CustDefaultLocation table so we added this table in Tables under permission node of SSRS Report.
4) Save your changes and run the report again.
5) If you still got the error check for info log and if there are still other tables permission issue add them too into SSRS Reports\Reports\Your_Report_Name\Designs\Design\Permissions\Tables node.
6) Please note this is the only solution for this type of error in SSRS Report.

We hope this solution helped you to find out solution for SSRS report runtime error in AX 2012. Please comment your valuable feedback for this article...

Author:
Chirag Gupta
Microsoft Dynamics D365/AX 2012
Senior Technical Consultant at IBM Bangalore

Date:
12-Apr-2020

Happy Learning !!

Comments

Post a Comment

Popular posts from this blog

[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)

AX 2012 - Command prompt compilation / AxBuild.exe for Parallel Compile on AOS of X++ to P-code / Parallel Compilation

AX 2012 - How to send SSRS report in email as an attachment using X++

AX 2012 - How to stop AOS when services got stuck at stopping status

AX 2012 - How to make a form field mandatory

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Fetch vendor address using X++ in AX 2012

AX 2012 - How to print current date and time on SSRS Report

[Error] - Error in unit of amount in currency KES. Must be rounded to 0.01 | The unit of 37.563.5343100000000000 KES being posted to account 32710001-- is outside the current penny rounding threshold | Posting has been canceled

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201