dbTalk Databases Forums  

Problem with WHere in MDX statement in RS report - why?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Problem with WHere in MDX statement in RS report - why? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kaisa M. Lindahl
 
Posts: n/a

Default Problem with WHere in MDX statement in RS report - why? - 01-11-2006 , 10:57 AM






This is my query:

with member [Measures].[DateUniqueName] as '[Dato].CurrentMember.UniqueName'
member [Measures].[DateName] as '[Dato].CurrentMember.Properties("Key")'
select {[Measures].[DateUniqueName],[Measures].[DateName]} on Columns
from [prosjekt komplett]
where (Tail(nonemptycrossjoin( [Dato].[Day].members,{[Medarbeider].&[1005]},
{[Measures].[Totale Timer]}, 1)).Item(0))

On my dev box and on my test box, this works nicely, and gives me the last
date a given employee has registered an hour.

On my production server, it fails, with the following error:

An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Query execution failed for data set 'SisteDato'. (rsErrorExecutingCommand)
Get Online Help
Formula error - <null> WHERE clause not supported - when calculating the
WHERE clause

- My where clause works nicely on one server, but not this. What could the
reason be?

Kaisa M. Lindahl



Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: Problem with WHere in MDX statement in RS report - why? - 01-12-2006 , 04:18 AM






This sounds like a configuration issue if the query works correctly on
dev and test. Do you have other OLAP based reports in production? Have
you checked the version of the MSOLAP provider in each of the
environments?

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <#zWnfAtFGHA.344 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, kaisaml (AT) hotmail (DOT) com
says...
Quote:
This is my query:

with member [Measures].[DateUniqueName] as '[Dato].CurrentMember.UniqueName'
member [Measures].[DateName] as '[Dato].CurrentMember.Properties("Key")'
select {[Measures].[DateUniqueName],[Measures].[DateName]} on Columns
from [prosjekt komplett]
where (Tail(nonemptycrossjoin( [Dato].[Day].members,{[Medarbeider].&[1005]},
{[Measures].[Totale Timer]}, 1)).Item(0))

On my dev box and on my test box, this works nicely, and gives me the last
date a given employee has registered an hour.

On my production server, it fails, with the following error:

An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Query execution failed for data set 'SisteDato'. (rsErrorExecutingCommand)
Get Online Help
Formula error - <null> WHERE clause not supported - when calculating the
WHERE clause

- My where clause works nicely on one server, but not this. What could the
reason be?

Kaisa M. Lindahl




Reply With Quote
  #3  
Old   
Kaisa M. Lindahl
 
Posts: n/a

Default Re: Problem with WHere in MDX statement in RS report - why? - 01-12-2006 , 07:45 AM



I do have 20+ other reports on the server, so I was a bit surprised to see
it didn't work.
Another thing that doesn't work is omitting defaultmember when using
descendants. This (defaultmember) seems to be a problem with locales, but
I'm not sure if that is the case with my Where clause problem.The production
server is set with a different locale than my test server, but I can't
really change that by myself, so I'm not sure if that's what causing the
problem. Both servers are on the same Service pack edition.

Kaisa M. Lindahl


<Darren Gosbell> wrote

Quote:
This sounds like a configuration issue if the query works correctly on
dev and test. Do you have other OLAP based reports in production? Have
you checked the version of the MSOLAP provider in each of the
environments?

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <#zWnfAtFGHA.344 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, kaisaml (AT) hotmail (DOT) com
says...
This is my query:

with member [Measures].[DateUniqueName] as
'[Dato].CurrentMember.UniqueName'
member [Measures].[DateName] as '[Dato].CurrentMember.Properties("Key")'
select {[Measures].[DateUniqueName],[Measures].[DateName]} on Columns
from [prosjekt komplett]
where (Tail(nonemptycrossjoin(
[Dato].[Day].members,{[Medarbeider].&[1005]},
{[Measures].[Totale Timer]}, 1)).Item(0))

On my dev box and on my test box, this works nicely, and gives me the
last
date a given employee has registered an hour.

On my production server, it fails, with the following error:

An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Query execution failed for data set 'SisteDato'.
(rsErrorExecutingCommand)
Get Online Help
Formula error - <null> WHERE clause not supported - when calculating the
WHERE clause

- My where clause works nicely on one server, but not this. What could
the
reason be?

Kaisa M. Lindahl






Reply With Quote
  #4  
Old   
Kaisa M. Lindahl
 
Posts: n/a

Default Re: Problem with WHere in MDX statement in RS report - why? - 01-12-2006 , 09:36 AM



The problem was solved by rewriting the MDX statement. A developer told me
that [Totale Timer] was the default measure, so I removed it from the query,
and now it works.
Not quite sure why, though, so any suggestions on why are very interesting.

Final, working query:
with member [Measures].[DateUniqueName] as '[Dato].CurrentMember.UniqueName'
member [Measures].[DateName] as '[Dato].CurrentMember.Properties("Key")'
select {[Measures].[DateUniqueName],[Measures].[DateName]} on Columns
from [prosjekt komplett]
where (Tail(nonemptycrossjoin( [Dato].[Day].members,{[Medarbeider].&[1005]},
1)).Item(0))


Kaisa M. Lindahl

"Kaisa M. Lindahl" <kaisaml (AT) hotmail (DOT) com> wrote

Quote:
I do have 20+ other reports on the server, so I was a bit surprised to see
it didn't work.
Another thing that doesn't work is omitting defaultmember when using
descendants. This (defaultmember) seems to be a problem with locales, but
I'm not sure if that is the case with my Where clause problem.The
production server is set with a different locale than my test server, but
I can't really change that by myself, so I'm not sure if that's what
causing the problem. Both servers are on the same Service pack edition.

Kaisa M. Lindahl


Darren Gosbell> wrote in message
news:MPG.1e30d802ccbc4d6198983f (AT) news (DOT) microsoft.com...
This sounds like a configuration issue if the query works correctly on
dev and test. Do you have other OLAP based reports in production? Have
you checked the version of the MSOLAP provider in each of the
environments?

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <#zWnfAtFGHA.344 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, kaisaml (AT) hotmail (DOT) com
says...
This is my query:

with member [Measures].[DateUniqueName] as
'[Dato].CurrentMember.UniqueName'
member [Measures].[DateName] as '[Dato].CurrentMember.Properties("Key")'
select {[Measures].[DateUniqueName],[Measures].[DateName]} on Columns
from [prosjekt komplett]
where (Tail(nonemptycrossjoin(
[Dato].[Day].members,{[Medarbeider].&[1005]},
{[Measures].[Totale Timer]}, 1)).Item(0))

On my dev box and on my test box, this works nicely, and gives me the
last
date a given employee has registered an hour.

On my production server, it fails, with the following error:

An error has occurred during report processing. (rsProcessingAborted)
Get
Online Help
Query execution failed for data set 'SisteDato'.
(rsErrorExecutingCommand)
Get Online Help
Formula error - <null> WHERE clause not supported - when calculating the
WHERE clause

- My where clause works nicely on one server, but not this. What could
the
reason be?

Kaisa M. Lindahl








Reply With Quote
  #5  
Old   
 
Posts: n/a

Default Re: Problem with WHere in MDX statement in RS report - why? - 01-14-2006 , 10:28 PM



In article <uQ$XF44FGHA.1452 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, kaisaml (AT) hotmail (DOT) com
says...
Quote:
Not quite sure why, though, so any suggestions on why are very interesting.

I can't see any obvious reason why. There are probably a couple of
different ways the query could be written, but I can't think of anything
that explains why the final query works and the first one does not. They
should be equivalent.

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.