Cannot read the next data row for the dataset (Internal error: An unexpected exception has occurred) MDX reporting SSAS
I am running a SSRS report on SQL Server 2008 R2 which is built on SSAS cube (Analysis Services) using MDX query, when I preview for the first time it runs good. But if I pass a specific value into a report parameter I am getting the error "Cannot
read the next data row for the dataset (Internal error: An unexpected exception has occurred). Internal error: The operation terminated unsuccessfully" I am not sure what is the exact problem.
We are passing the value into a string parameter which is declared in the report. However, below is the MDX query we are using
WITH
MEMBER [Date].[Date].[<1 Day] AS STRTOTUPLE(@ToDateDate, CONSTRAINED)
MEMBER [Date].[Date].[1-2 Days] AS AGGREGATE(STRTOMEMBER(@ToDateDate, CONSTRAINED).PrevMember.PrevMember : STRTOMEMBER(@ToDateDate, CONSTRAINED).PrevMember)
MEMBER [Date].[Date].[3-7 Days] AS AGGREGATE(STRTOMEMBER(@ToDateDate, CONSTRAINED).PrevMember.PrevMember.PrevMember.PrevMember.PrevMember.PrevMember.PrevMember : STRTOMEMBER(@ToDateDate, CONSTRAINED).PrevMember.PrevMember.PrevMember)
MEMBER [Date].[Date].[Over 1 week] AS AGGREGATE(STRTOMEMBER(@FromDateDate, CONSTRAINED):STRTOMEMBER(@ToDateDate, CONSTRAINED).PrevMember.PrevMember.PrevMember.PrevMember.PrevMember.PrevMember.PrevMember.PrevMember)
SELECT non empty (
[Measures].[Alert Count]
) ON COLUMNS,
(
{ [Date].[Date].[<1 Day],
[Date].[Date].[1-2 Days],
[Date].[Date].[3-7 Days],
[Date].[Date].[Over 1 week]} *
{[Ref Alert Type].[Type - Sub Type].[Alert Type]}
) ON ROWS
FROM (
SELECT ( STRTOMEMBER(@FromDateDate, CONSTRAINED) : STRTOMEMBER(@ToDateDate, CONSTRAINED) ) ON COLUMNS FROM (
SELECT ( STRTOSET(@RefAlertTypeTypeSubType, CONSTRAINED) ) ON COLUMNS FROM [Alert]))
WHERE (
[Ref Alert Status].[Alert Status].currentmember ,
IIF( STRTOSET(@SecuritySecurityCode, CONSTRAINED).Count = 1, STRTOSET(@SecuritySecurityCode, CONSTRAINED), [Instrument].[Instrument Code].currentmember ),
IIF( STRTOSET(@PartyPartyId, CONSTRAINED).Count = 1, STRTOSET(@PartyPartyId, CONSTRAINED), [Party].[Party Id].currentmember ) )
NOTE: If i remove the where clause condition from the query it will run well and good... But I am not sure what is the wrong in where condition, I tried removing the constrained flag as well still the same error.
Any help well appreciated.
Rgrds,
H.
August 14th, 2012 5:34am
Hello,
Check out the thread below. It may help you.
http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/73ed7a92-9f46-4a83-9809-ed9b1ace73f8
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2012 7:12am
Hi Zaviderione
Thank you for your response, my request is some what different. I am getting error in MDX query which I have posted earlier. If I remove the where condition from query its running good. Please let me know is there any correction needs to be made in the MDX
query.
August 14th, 2012 7:16am