Alex_404
Alex_404

Reputation: 409

Visual Studio 2010 - Query designer for MDX queries in SSRS reports leaves remnants of old code

I am not an expert in SSRS and having troubles with my SSRS report that I've copied from another SSRS report and have made some changes to.

I have an MDX query in the original report that is reading data from SSAS cube. The query works fine in the report but cannot be parsed by query designer because of the parameter controlled parts like:

StrToSet(@Customer,CONSTRAINED)

which fail in the designer since the value for customer is not set properly and constrained condition cannot be parsed (as I understand).

Now, I've modified the query and it still works but I have remnants of the old query in the report code which are related to the last parsed result from the query designer and cannot be updated since the designer cannot parse the new query either (I have no idea how it was parsed the first time).

The problem is that the old query is still saved in the query parser, I can see it when checking the XML code for the report, its right below my new query:

<DataSet Name="namehere">
  <Query>
    <CommandText>
--Correct query here, which runs in the report
    </CommandText>
    <rd:DesignerState>
      <QueryDefinition xmlns="http://schemas.microsoft.com/AnalysisServices/QueryDefinition">
        <Query>
          <Statement>
--Incorrect outdated query from the query builder's last parsed result
          </Statement>
         </Query>
      </QueryDefinition>
    </rd:DesignerState>
    <rd:SuppressAutoUpdate>true</rd:SuppressAutoUpdate>
  </Query>
</DataSet>

This leads to some "fake" warnings when running the report due to now missing fields in the new query.

How can I remove the fake warnings?

EDIT: nevermind, I've found the "Query parameters" button in the query designer which lets me set the default values for the parameters to parse and run the query. Now its sync'ed to the real query and the issue is solved.

Upvotes: 0

Views: 221

Answers (1)

Alex_404
Alex_404

Reputation: 409

nevermind, I've found the "Query parameters" button in the query designer which lets me set the default values for the parameters to parse and run the query. Now its sync'ed to the real query and the issue is solved.

Upvotes: 1

Related Questions