Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I am trying to implement a small C# application. At the moment I get my data by handling the hypercube which is not very readable and if something changes in the application I have also to change it in the C# code.
Therefor, the idea was to retrieve data of known master vizualisations (charts, tables, ...).
Does anyone have an example code of how to do this? Best thing would be to have a static method which just needs the IApp and the name of the master vizualisation.
Thanks in advance!
Something like this perhaps?
static IEnumerable<NxCellRows> GetMasterObjectData(IApp app, string objectTitle)
{
var list = app.GetMasterObjectList();
var id = list.Items.First(i => i.Meta.Get<string>("title") == objectTitle).Info.Id;
app.DestroyGenericObject(list.Id);
var o = app.GetGenericObject(id);
var pager = o.GetAllHyperCubePagers().First();
var allPages = pager.IteratePages(new[] {new NxPage {Width = pager.NumberOfColumns, Height = 100}}, Pager.Next).Select(pageSet => pageSet.Single());
return allPages.SelectMany(page => page.Matrix);
}