So, since posting this I’ve tried a bunch of different variations of the syntax I mentioned to return the values that I want… and @jamie.cherwonka you are absolutely right about the semicolon, hah, I can’t believe I didn’t see that originally, anyway I did actually realize it eventually and started using some of the expressions I was trying to use in this cube with other cubes and found that I at least had no problem running
DateTime date1 = $Status_StartDate$;
return date1.Year;
in other cubes I have access to. It’s just that cube, which pulls from a view, I’m having problems with and keep getting an error message from. I can’t figure out if it’s a problem with the data or what.
I’m getting these errors, and have now emailed dundas support and am taking a break from googling and trying to resolve what’s going on to work in a different project haha.
Anyone have to resolve something like this before?
Error 1 of 3
Title:
Data retrieval failed, as it was not possible to generate a valid query for the specified metric set.
Details:
Web response code: 500 Internal Server Error (Dundas.BI.Data.DataRetrieval.InvalidQueryException)
at Dundas.BI.Data.DataRetrieval.ReaderProcessor.Process()
at Dundas.BI.Data.DataRetrieval.TransformPlan.GetCellset(Int32 pageSequenceStart, Int32 pageSequenceSize)
at Dundas.BI.Entities.DataCubes.DataCubeService.PreviewTransformOutput(DataCube dataCube, Guid transformId, Int32 pageSequenceStart, Int32 pageSequenceSize, IEnumerable1 parameterValues, IEnumerable
1 sortingRules)
at Dundas.BI.WebApi.Controllers.DataCubeController.PreviewTransform(Guid id, PreviewTransformOptions options, Nullable1 sessionId) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary
2 arguments, CancellationToken cancellationToken)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()
Version: 6.0.1.1001
Error 2 of 3
Title:
Runtime error Object reference not set to an instance of an object. Line: 2 Column: 14
Details:
Web response code: 500 Internal Server Error (Dundas.BI.Scripting.ScriptException)
at Dundas.BI.Scripting.ScriptEngineData.Throw(ScriptException scriptException)
at Dundas.BI.Scripting.ScriptTreeNode.Run(Object inputObj, ScriptTreeNode parent)
at Dundas.BI.Scripting.ScriptTreeNode.Run(Object inputObj, ScriptTreeNode parent)
at Dundas.BI.Scripting.ReturnNode.Run(Object inputObj)
at Dundas.BI.Scripting.ScriptTreeNode.Run(Object inputObj, ScriptTreeNode parent)
at Dundas.BI.Scripting.CodeBlockNode.Run(Object inputObj)
at Dundas.BI.Scripting.ScriptTreeNode.Run(Object inputObj, ScriptTreeNode parent)
at Dundas.BI.Scripting.ScriptEngine.RunScript()
at Dundas.BI.Scripting.SuperScript.RunScript(SuperScriptState state)
at Dundas.BI.Data.Transforms.ScriptProcessor.ExecuteScript(ScriptElement element, StepInfo step, Boolean isFinalResult, SuperScriptState scriptState)
at Dundas.BI.Data.Transforms.ScriptProcessor.ComputeScriptStep(ScriptElement element, Int32 stepIndex, SuperScriptState scriptState)
at Dundas.BI.Data.Transforms.ScriptProcessor.ComputeElement(ScriptElement element)
at Dundas.BI.Data.Transforms.ScriptProcessor.EvaluateOutputExpressions()
at Dundas.BI.Data.Transforms.StandardTransforms.CalculatedElementTransform.Read()
at Dundas.BI.Data.DataRetrieval.TransformReader.Read()
at Dundas.BI.Data.DataRetrieval.ReaderProcessor.ConvertRawTabularResult(ITransformReader transformReader)
at Dundas.BI.Data.DataRetrieval.ReaderProcessor.ConvertTabularResult(ITransformReader transformReader)
at Dundas.BI.Data.DataRetrieval.ReaderProcessor.Process()
Error 3 of 3
Title:
Object reference not set to an instance of an object.
Details:
Web response code: 500 Internal Server Error (System.NullReferenceException)
at System.Object.GetType()
at Dundas.BI.Scripting.PropertyNode.Run(Object inputObj)
at Dundas.BI.Scripting.ScriptTreeNode.Run(Object inputObj, ScriptTreeNode parent)