“ExecuteReader: CommandText property has not been initialized”

If you install the Lansweeper database under SQL Server, any built-in and custom reports seen in the Reports tab of the web console are added as views to your SQL Server instance. Report views are called "web40rep..." or "web50rep..."

If someone deletes report views from your SQL Server instance, or if your Lansweeper database is moved without moving the report views as well, you will encounter one of the errors below when opening the affected reports in the Reports tab of the web console. The exact error message depends on the Lansweeper version used. The name of the missing report view can be seen in the web console URL.

Error: ExecuteReader: CommandText property has not been initialized
Error: Report cannot be found
CommandText property has not been initialized
Report cannot be found
Lansweeper views in SQL Server

To resolve these errors and regain access to the affected reports, do one of the following:

  • If you previously created one, restore a database backup that still contains the report views. More info on restoring database backups can be found in this knowledge base article.
  • If they were built-in, retrieve the faulty reports' original SQL queries from our report center and use these queries to recreate the reports in Lansweeper. Our report center stores all built-in reports and instructions for creating a report from a SQL query can be found in this forum topic.

Related Articles