none
gettigng error 'Query (1, 1020) The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated'

    Question

  • Hi,

    I am getting error

    'Query (1, 514) The restrictions imposed by the CONSTRAINED flag in the

    STRTOSET function were violated'

    Please let me know how to fix this.

    Thanks and Regards,

    Ramesh

    Tuesday, June 25, 2013 10:19 AM

Answers

All replies

  • Hi Ramesh,

    In your mdx if you using any constrained option, you need to remove and just use STRTOSET('[Geography].[State-Province].Members').

    If you need to use the Constrained option, then check whether all the set specification must contain qualified or unqualified member names and enclosed in {}.

    For Example : STRTOSET('{[Geography].[State-Province].Members}',Constrained).

    Here is the MSDN Article for the same - > http://msdn.microsoft.com/en-us/library/ms144782.aspx




    Regards Harsh


    • Edited by Harsh Kumar Tuesday, June 25, 2013 10:48 AM Edited
    Tuesday, June 25, 2013 10:47 AM
  • Hello Ramesh ,

       Harsh's above suggestion will help you to avoid this error. But i would like to recommend you to check whether the values passed into the MDX STRTOSET function is proper or not. CONSTRAINED flag is used to make sure only resolvalbe values are passed into the STRTOSET function.


    Best Regards Sorna

    Tuesday, June 25, 2013 12:23 PM
  • Hi Sorna /Harsh'a,

    I am not passing any hardcoded values as parameter. I have five query parameters all are geeting loaded from dimensions.

    I am not adding extra values.

    Yes, I removed constraint flag.

    After removing constraint flag it is taking infinite time to run the report.

    Please help on this.

    Thanks in advance,

    Raemesh

    Wednesday, June 26, 2013 2:55 AM
  • Hi Ramesh,

    If possible can you please post your query or part of query which we can look for.<o:p></o:p>

    Yup the removing the CONSTRAINED flag may lead to severe performance hit. Meanwhile you can look at this blog for details information: 

    <o:p>http://www.bp-msbi.com/2010/04/passing-unconstrained-set-and-member-parameters-between-reports-in-reporting-services/</o:p>

    <o:p></o:p>



    Regards Harsh

    Thursday, June 27, 2013 6:53 AM