Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Can Execute Report But Fails in Query Builder

$
0
0

I'm running into an odd issue...

I've inherited a report that was built using Visual Studio. It's going against an Analysis Services cube and the query is in MDX.

For some reason, when I view the query in Query Builder and attempt to execute the query, it throws an error. I then cancel out of Query Builder and cancel any changes. Now if I actually run the report, it runs just fine. Users have verified that the results are correct.

I've never seen this before! I've attached the query and the error message:

WITH

SET [Selected Discipline] AS STRTOSET(@Disciplines, CONSTRAINED)
SET [Selected Department] AS STRTOSET(@Departments, CONSTRAINED)

SET [Selected Departments] AS IIF(@Disciplines = @Departments, 
  FILTER(
    DESCENDANTS([Selected Discipline], [Employee].[DISC - DEPT - EMP].[Department], AFTER), 
    NOT INSTR([Employee].[DISC - DEPT - EMP].CurrentMember.UNIQUE_NAME, "Freelance")),
  DESCENDANTS([Selected Department], [Employee].[DISC - DEPT - EMP].[Department], AFTER))

SET [TTM] AS { LastPeriods(12, StrToMember(@SelectedMonth, CONSTRAINED)) }

SELECT 


  [Measures].[Employee Hours], 
  [Measures].[Employee Hours %] 
} ON COLUMNS, 

NON EMPTY CROSSJOIN(
[Selected Departments],
[Employee].[Employee Bill Rate].[Employee Bill Rate].ALLMEMBERS,
[Employee].[Employee Level].[Employee Level].ALLMEMBERS,
[TTM]) 

DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 

FROM [OLSON BI]

WHERE (

[Employee Hours Time Category].[Time Category].&[Client Facing],
[Employee Hours Time Category].[Utilization Category].&[PRODUCTION])

CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

The error is:


A. M. Robinson


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>