sp_tables stored procedure gets executed when running crystal report 2008
I have created a new crystal report using Crystal Report 2008. When I run this crystal report in my application, SQL Profile shows me
exec sp_tables N'<view_Name>',N'dbo',N'<db_name>',NULL
statement gets executed.
When I design the same kind of report in Crystal Report 11, this statement is not being executed in it.
Is this something newly introduced?
This statement causes a problem to user who doesn't have permission to select any field. At the time of report loading, this statement doesn't return any data and report fails to load. "The Tables <view_name> doesn't found." error gets generated.
Please provide your feedback if you are aware of any information.
The sp_tables call is made when the report is syncing with the database. You can prevent this from happening if you turn off the option "Verify on First Refresh" in the options. For Visual Studio, this option is found on the menu bar Crystal Reports>> Report>> Report Options...
With this value off, the report will not verify the database objects used, so if there is a change to the schema, it will not be reflected in the report.
Hope this helps,