Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated

Greetings,

 

I am working with Report Builder parameters. I have two identical datasets (ds and ds1), derived from the same cube, with a field called Year Number in a folder called Date and a measure called Direct Claim Deductible Recoverable End of Year.

 

I also have a parameter in the Query designer of ds:

query designer.png

A parameter called DateYearNumber also exists in the Parameters list on the Report Data pane, with the following properties:

parameter properties.pngparameter properties 2.pngparameter properties 3.pngparameter properties 4.png

Back in the dataset properties of ds0, the parameter name is DateYearNumber and the Value is @DateYearNumber.

Yet when I run the report and select a year from my parameter, it comes up with this error message:

strtoset.png

So, what do I do?

1 ACCEPTED SOLUTION
v-xiaoyan-msft
Community Support
Community Support

Hi @Anonymous ,

 

When the CONSTRAINED flag is used, the set specification must contain qualified or unqualified member names or a set of tuples containing qualified or unqualified member names enclosed by braces {}. This flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to qualified or unqualified member names, the following error appears: "The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated."

 

For more information,you may refer to StrToSet (MDX) - SQL Server | Microsoft Learn

 

You may also check the thread below to see if helps

reporting services - SSRS - the restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated - Stack Overflow

 

 

Best Regards,
Community Support Team _ Caitlyn

View solution in original post

1 REPLY 1
v-xiaoyan-msft
Community Support
Community Support

Hi @Anonymous ,

 

When the CONSTRAINED flag is used, the set specification must contain qualified or unqualified member names or a set of tuples containing qualified or unqualified member names enclosed by braces {}. This flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to qualified or unqualified member names, the following error appears: "The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated."

 

For more information,you may refer to StrToSet (MDX) - SQL Server | Microsoft Learn

 

You may also check the thread below to see if helps

reporting services - SSRS - the restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated - Stack Overflow

 

 

Best Regards,
Community Support Team _ Caitlyn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.