Workaround for “Could not update a list of fields for the query” error in SSRS

Overview:  A quick workaround for an intermittent SQL Server Reporting Services error.

Reporting Services Error

The error I received is:

Could not update a list of fields for the query.  Verify that you can connect to the data source and that your query syntax is correct.

I received this error sometimes after updating the dataset (with the preview of the query running fine), at the point when I clicked OK to save the dataset changes.  In my situation the data source was an Analysis Services cube (SQL Server 2008 R2).

     image

Workaround

Since I started using this method, I haven’t seen the error.

1.  Go to Dataset Properties.  (Specifically…do not  jump directly to the Query.)

     image

2.  Select the Query Designer button.  (Yes, it’s an extra click, I know.)

     image

3.  Update your query.  Click OK within the Query Designer.

4.  Click the Refresh Fields button, and then OK.

     image

That’s it.  I haven’t had any trouble since I started accessing and saving the query “the long way” and now it’s just habit.