The query contains the XXXXXName parameter, which is not declared. SSRS2008/MDX query
-
Friday, April 16, 2010 9:45 AM
Parser: The query contains the XXXXXName parameter, which is not declared. (msmgdsrv)
I have no idea why I keep getting this error. It occurs when I change the MDX in the query designer and trying OKing out of the query designer.
The strange thing is that the parameter DOES exist, I can see it in the parameters section of the dataset dialog. I am creating it before I do anything else with the query.
---------------------------------
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1Installed Edition: IDE Standard
AnkhSVN - Subversion Support for Visual Studio 2.1.7756.392
AnkhSVN - Subversion Support for Visual Studio 2.1.7756.392
* Ankh.Package 2.1.7756.392
* Subversion 1.6.9 via SharpSvn 1.6009.1458.9025SharpSvn is linked to: Apr 1.3.8, Apr-util 1.3.9, Neon 0.29.3, OpenSSL 0.9.8l 5 Nov 2009, serf 0.3.0, SQLite 3.6.22, Subversion1.6.9-SharpSvn-tag-1.6.9@902549, ZLib 1.2.3
SharpSvn is dynamically linked to: Cyrus Sasl 2.1.23
SharpSvn is optionally linked to: Berkeley DB 4.4.20, SharpPlink 1.6009.1458.9025Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB945282) KB945282
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945282.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946040) KB946040
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946040.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946308) KB946308
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946308.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946344) KB946344
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946344.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946581) KB946581
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946581.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947173) KB947173
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947173.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947540) KB947540
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947540.Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947789) KB947789
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947789.Security Update for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB972222) KB972222
This security update is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this security update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/972222.SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 10.0.2531.0SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 10.0.2531.0 ((Katmai_PCU_Main).090329-1015 )SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 10.0.2531.0
LaCie drives. Failing when you need them most."La" meaning "Terrible", "Cie" meaning "customer service"
All Replies
-
Friday, April 16, 2010 2:07 PMI have recreated affected datasets from scratch and am still getting this error
LaCie drives. Failing when you need them most."La" meaning "Terrible", "Cie" meaning "customer service" -
Tuesday, April 20, 2010 3:23 AMModerator
I still think the query contain parameter which is not declared. Note: don’t use prefixed character @ in parameter section. For example, if the query contains @A, but you declare parameter with name @A in parameter pane, then you will get an error message:
Parser: The query contains the A parameter, which is not declared. (msmgdsrv)
Hope this helps,
Raymond
- Marked As Answer by Jerry NeeModerator Friday, April 23, 2010 6:20 AM
-
Thursday, April 29, 2010 8:25 AM
The problem appeared to be caused by the poor way in which the query designer handles changes when pointing to a different cube, with slightly different structures.
I think even in SSIS it does a better job of remapping things when you change them.
I had to go and mess about with the xml to change this and make it work.
LaCie drives. Failing when you need them most."La" meaning "Terrible", "Cie" meaning "customer service" -
Thursday, March 29, 2012 5:53 PM
I've run into a similar situation but seemed to have solved it. What happened with me is that I completed a report but discovered during testing that one of the 3 parameters was pulling the wrong data. The value of the bad parameter (DaypartsByNetwork) depended on the value of the two other parameters. MDX below:
WITH
MEMBER [Measures].[ParameterCaption] AS [Dayparts].[DP DISPLAY].CURRENTMEMBER.MEMBER_CAPTION
MEMBER [Measures].[ParameterValue] AS [Dayparts].[DP DISPLAY].CURRENTMEMBER.UNIQUENAME
MEMBER [Measures].[ParameterLevel] AS [Dayparts].[DP DISPLAY].CURRENTMEMBER.LEVEL.ORDINAL
SELECT {
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]} ON COLUMNS ,
[Dayparts].[DP DISPLAY].ALLMEMBERS ON ROWS
FROM ( SELECT ( STRTOSET(@DaypartsNetwork, CONSTRAINED) ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@AirDatesBroadcastYrQtr, CONSTRAINED) ) ON COLUMNS
FROM ( SELECT ( { [Ad Sales Details].[NET AVAILS FLAG].&[Y] } ) ON COLUMNS
FROM [Inventory])))This failed with the error:
"Parser: The query contains the DaypartsNetwork parameter, which is not declared. (msmgdsrv)"
even though the parameter DaypartsNetwork exists and pulls the correct data.
The solution that worked for me was to create a new dataset and manually enter the MDX for the dataset, then in Query Designer, right click the data area and choose query parameters. There I entered the definitions for both of the other parameters exactly as they already existed and the report works. It seems that by entering them in the dataset definition, it linked to the existing parameters.
Does anyone see potential problems approaching it this way? Is it possible that I have duplicated parameter definitions and created a maintenance issue later?
Thanks!
Brad

