Is it possible to add a measure dynamically bypassing th data source altogether.
For example, If an Excel file is loaded in the cube and displayed in the grid. Is it possilble to have the user create a new measure and added into the collection of measure. This measure will be essentialy a sum and a product of two other measure. Also, we want to display it right next to other measure in the grid.
Thanks.
Hello,
Have you tried the translator that .NET Reflector offers?
Just load the assembly, then navigate to the class method you are interesting in and then use the drop down to select the appropriate language for you.Hope that helps.
Regards.Plamen.
Hi Plamen,
would it be possible for you to translate this code to vb.net?
That is exactly what I need, but couldn't make it work in Vb.net for the last 2 days...
Thanks
Fabian Zandomeni
Hello Alex,
Please contact me through our developers support team, so we can look into your issue in details.Best regards.Plamen.
I’ve decided to post a request for help on my next problem even though I am not sure it is directly related to the name of this (sub) forum. If it (my question) does not relate to what you are usually work on , could you pls refer me to a proper forum/specialist ?
Here is the thing:
Few weeks ago with your great help I was able to implement dynamic creation of "derived" columns and provide a logic for evaluation of expressions entered by the users for those columns. In fact those are not measures , but dimensions.
Recently I have started to get unhandled exceptions from InfragisticsWPF4.Olap.FlatData.v11.1.
Usually it happens when I try to drag another dimension from data selector into the grid . Here is the exception
///////////////////////////////////////////////////
System.IndexOutOfRangeException was unhandled
Index was outside the bounds of the array.InfragisticsWPF4.Olap.FlatData.v11.1
at Infragistics.Olap.FlatData.FlatDataModelProvider.CreateLevelMembers(IEnumerable`1 items, IMember parentMember, IHierarchy hierarchy, Int32 hierarchyIndex, HierarchyDescriptor hierarchyDescriptor, Int32 levelIndex, DimensionMetadata dimensionMetadata, String uniqueNamePart) at Infragistics.Olap.FlatData.FlatDataModelProvider.BuildMembers(IHierarchy hierarchy) at Infragistics.Olap.FlatData.FlatDataModelProvider.LoadMembersAsync(ICube cube, ILevel level) at Infragistics.Olap.FilterViewModelBase.LoadFilterMembersAsync() at Infragistics.Olap.FlatData.FlatDataSource.CreateFilterViewModel(IHierarchy hierarchy) at Infragistics.Controls.Grids.DropTriggerAction.AssociatedObjectDrop(Object sender, DropEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Infragistics.DragDrop.DragSource.OnDrop(DropEventArgs args) at Infragistics.DragDrop.DragDropManager.OnDrop(MouseEventArgs mouseEventArgs) at Infragistics.DragDrop.DragDropManager.EndDrag(Boolean dragCancel) at Infragistics.DragDrop.DragDropManager.QueryContinueDrag(DependencyObject sender, Boolean escapePressed, Boolean mouseReleased) at Infragistics.DragDrop.DragDropManager.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at Stealth.App.Main() in D:\dev\svn\repos\ares\trunk\Stealth.Apps.Ares\obj\x86\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
{Void CreateLevelMembers(System.Collections.Generic.IEnumerable`1[Infragistics.Olap.FlatData.DataRowMetadata], Infragistics.Olap.Data.IMember, Infragistics.Olap.Data.IHierarchy, Int32, Infragistics.Olap.FlatData.HierarchyDescriptor, Int32, Infragistics.Olap.FlatData.DimensionMetadata, System.String)}
I understand that it is almost impossible to get to the root of teh problem with such info, but maybe it is known issue and there is a patch/workaround for it.
I have also mentioned that it usually happens with desterilized layout views. I use doe persisting a solution offered by Atanas Dyulgerov in his blog :
http://blogs.infragistics.com/blogs/atanas_dyulgerov/archive/2010/07/15/serializing-xampivotgrid-views-in-silverlight.aspx
Thanks a lot,
Have a nice weekend,
Alex
Thanks a lot Plamen,
Based on your example I was able to create virtual dimension without underlaying data source type property for it.
Thanks again,
Alex Nebogatov