none
Query (1, 1) Parser: The syntax for = is incorrect

    Question

  • I have a very simple MDX query in the query mode of SSRS dataset editor

    select [Measures].[Sales] on 0, [Customer].[Customer ID].AllMembers on 1 from [Sales]

    This query works fine. If I try to build the same query as an expression

    ="select [Measures].[Sales] on 0, [Customer].[Customer ID].AllMembers on 1 from [Sales]"

    Then I get the error


    Why am I not able to write the query as an expression?

    Tuesday, June 16, 2009 5:33 PM

Answers

  • Hi,

     

    Because reporting Services will treat a query string that begins with "=" as an expression, but you cannot write an expression in query designer, are you using Reporting Services 2005? If so, try the below steps:

     

    1)    In query designer, click ellipsis (. . .) to edit the dataset.

    2)    In query string textbox, click fx to edit the expression, copy the expression to here. Click OK.

    3)    You can use dynamic expression to query mdx statement now.

     

    More information, see:

    http://msdn.microsoft.com/en-us/library/aa902647(SQL.80).aspx

     

    Hope this helps.

    Raymond

    Thursday, June 18, 2009 5:17 AM
    Moderator

All replies


  • You cannot write a MDX query as an expression because the MDX query designer doesn't support RDL expressions. 

    -p
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 17, 2009 5:49 PM
    Answerer
  • Hi,

     

    Because reporting Services will treat a query string that begins with "=" as an expression, but you cannot write an expression in query designer, are you using Reporting Services 2005? If so, try the below steps:

     

    1)    In query designer, click ellipsis (. . .) to edit the dataset.

    2)    In query string textbox, click fx to edit the expression, copy the expression to here. Click OK.

    3)    You can use dynamic expression to query mdx statement now.

     

    More information, see:

    http://msdn.microsoft.com/en-us/library/aa902647(SQL.80).aspx

     

    Hope this helps.

    Raymond

    Thursday, June 18, 2009 5:17 AM
    Moderator