﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Analysis Services  / STRTOSET - Constrained / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 17:02:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: STRTOSET - Constrained</title><link>http://www.sqlservercentral.com/Forums/Topic853360-17-1.aspx</link><description>Hi All,currently in my solution one cube structure has changed.according to the new cube we are modifying the existing reports.here my problem isI prepared a dataset with new cube membersSELECT NON EMPTY { [Measures].[Scrapping BU],  [Measures].[Scrapping Local Currency],  [Measures].[Sales margin wo VAT (scrapping included)],  [Measures].[Stock sales wo VAT],  [Measures].[Sales margin wo VAT] } ON COLUMNS, NON EMPTY { (  [Product DIM].[Product Hierarchy FI].[MC0 FI].ALLMEMBERS ) }   DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT (   STRTOMEMBER(@FromBillingDateDIMDateHierarchyFI, CONSTRAINED) :   STRTOMEMBER(@ToBillingDateDIMDateHierarchyFI, CONSTRAINED) ) ON COLUMNS FROM ( SELECT (   STRTOSET(@MaterialSalesDIMAssortmentGrade, CONSTRAINED) ) ON COLUMNS FROM ( SELECT (   STRTOSET(@ProductDIMMCFI2, CONSTRAINED) ) ON COLUMNS FROM ( SELECT (   STRTOSET(@ProductDIMMCFI, CONSTRAINED) ) ON COLUMNS FROM ( SELECT (   STRTOSET(@StoreDIMStore, CONSTRAINED) ) ON COLUMNS FROM [Store Sales]))))) WHERE ( IIF(   STRTOSET(@StoreDIMStore, CONSTRAINED).Count = 1,   STRTOSET(@StoreDIMStore, CONSTRAINED), [Store DIM].[Store].currentmember ), IIF(   STRTOSET(@ProductDIMMCFI, CONSTRAINED).Count = 1,   STRTOSET(@ProductDIMMCFI, CONSTRAINED), [Product DIM].[MC4 FI].currentmember ), IIF(   STRTOSET(@ProductDIMMCFI2, CONSTRAINED).Count = 1,    STRTOSET(@ProductDIMMCFI2, CONSTRAINED), [Product DIM].[MC2 FI].currentmember ), IIF(    STRTOSET(@MaterialSalesDIMAssortmentGrade, CONSTRAINED).Count = 1,     STRTOSET(@MaterialSalesDIMAssortmentGrade, CONSTRAINED),     [Material Sales DIM].[Assortment Grade].currentmember ) )     CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING,     FONT_NAME, FONT_SIZE, FONT_FLAGSthis query running well in query designer.but after previewing am getting the following error.ERROR::crying: Query (12,69) The Restrictions imposed by the constrained flag in the strtoset function were voilated""""[b]I already gone through some posts:[/b] I have discovered that I needed to make adjustments to the Dimension definitions to not allow unknown as an option. Once I made the change and rebuilt the cubes, the report no longer threw the Constraint error. but in my case : am just creating a copy of old report and applying changes as per the TEST cube .in my previous cube also , unknown member is present.but am not getting any error there.can anybody please siggest something on this.my all new reports are showing same error.Thanks in advanceNiha</description><pubDate>Thu, 10 Jan 2013 03:56:05 GMT</pubDate><dc:creator>niha.736</dc:creator></item><item><title>RE: STRTOSET - Constrained</title><link>http://www.sqlservercentral.com/Forums/Topic853360-17-1.aspx</link><description>[quote][b]StrivingforGeekdom (2/9/2010)[/b][hr]I have discovered that I needed to make adjustments to the Dimension definitions to not allow unknown as an option.  Once I made the change and rebuilt the cubes, the report no longer threw the Constraint error.[/quote]Thanks a lot for your solution :-)</description><pubDate>Sun, 18 Mar 2012 03:49:33 GMT</pubDate><dc:creator>itksw</dc:creator></item><item><title>RE: STRTOSET - Constrained</title><link>http://www.sqlservercentral.com/Forums/Topic853360-17-1.aspx</link><description>I have applied this and re run the cube it works</description><pubDate>Fri, 27 May 2011 06:14:55 GMT</pubDate><dc:creator>asimyousaf</dc:creator></item><item><title>RE: STRTOSET - Constrained</title><link>http://www.sqlservercentral.com/Forums/Topic853360-17-1.aspx</link><description>I have discovered that I needed to make adjustments to the Dimension definitions to not allow unknown as an option.  Once I made the change and rebuilt the cubes, the report no longer threw the Constraint error.</description><pubDate>Tue, 09 Feb 2010 10:38:49 GMT</pubDate><dc:creator>StrivingforGeekdom</dc:creator></item><item><title>STRTOSET - Constrained</title><link>http://www.sqlservercentral.com/Forums/Topic853360-17-1.aspx</link><description>I am running into the following error -restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violatedI receive this error when using select all in a report using a datacube.  The MDX is auto-generated as follows:WITH MEMBER [Measures].[Total] AS '[Measures].[Overhead Cost Amount]  + [Measures].[Labor Cost Amount]+[Measures].[Hardware Cost Amount]+[Measures].[Material Cost Amount]' SELECT NON EMPTY { [Measures].[Material Cost Amount], [Measures].[Labor Cost Amount], [Measures].[Overhead Cost Amount], [Measures].[Total], [Measures].[Hardware Cost Amount] } ON COLUMNS, NON EMPTY { ([WIP Stage].[WIP Stage Description].[WIP Stage Description].ALLMEMBERS * [Program].[Program Description].[Program Description].ALLMEMBERS * [Responsible Department].[Department Description].[Department Description].ALLMEMBERS * [WIP Stage].[WIP Stage Code].[WIP Stage Code].ALLMEMBERS * [Analysis Date].[Reporting Range].[Reporting Range].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET(@ResponsibleDepartmentDepartmentDescription, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@ProgramProgramDescription, CONSTRAINED) ) ON COLUMNS FROM [Inventory Analysis Reporting])) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGSI have tried to create as an expression but can not make that work either.  I would appreciate any help.   </description><pubDate>Mon, 25 Jan 2010 15:42:01 GMT</pubDate><dc:creator>StrivingforGeekdom</dc:creator></item></channel></rss>