If you get the below error in Crystal Report
Failed to retrieve data from the database. Details: [Database Vendor Code: 229]
This mean you do not have access to the data. This possibly occurred because you created your report on one machine and then deployed it on another. On deployment, you noticed that your report does not pull that data instead you get this error. The most likely cause is the permission. You do not have permission to query that data or run stored procedures or function.
- Your report uses functions calls or store procedure, your login is not allowed to run function and stored procedures
- Your login does not have select permission for the database/table
- Other permission related problem
By allowing read or execute permission will fix the problem. If it is just one one function call /store procedure that is causing the problem, the following command will be helpful
GRANT EXECUTE ON dbo.my_function TO [user/role]