Friday, February 17, 2012

Error handling with MDX and Reporting Services

I have having trouble with an MDX Statement. There are some instances where the MDX statement I am passing in isn't correct or invalid. The report takes in serveral default parameters and creates an MDX statement from it. When this error happens I get an error similiar to

Formula error - cannot find dimension member ("[Time].[2005]") - in a name-binding function

on the report page. I would like to be able to handle this error in reporting services so how. Essientially, I would want to be able to just say if this error happens just take me the plain page and do not load up any defaults.You might consider this a hack, but this can be solved from outside Reporting Services with the new missing member functionality in 2005 (ie invalid member lookups wont generate errors),|||I am using RS 2005 and AS 2005 RTM.

I am having the report to accept a parameter UserUserID that accepts values such as [User].[User ID].&[1].

This is working fine when the front-end calls it with a correct/valid UserID.

When it is the calling the report with a valid UserID, two things that I observe happening:
a) when the Parameter is set to Hidden (on the Report Parameters properties), this error will be displayed "The 'UserUserID' parameter is missing a value"
b) when the Parameter is not set to Hidden, a blank page is shown with the parameter prompt <Select a Value>.

Is there any way to better handle situation a)? Since I need to hide the parameters from the end-users....

Thanks.

No comments:

Post a Comment