Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: Access to records in Detail View

$
0
0

Hi Richa,

Thank you. This looks like exactly what I’m looking for but I think the snippet I saw in the post associated with the above link had a tiny bug.

I kept getting an IndexOutOfRange exception on the 'var data = ' line and upon closer inspection, it seems as though OlapTable only has one column. The data that was displayed also seemed to be out by one row.

Changing the data line to select 'hti.Row-1′ and Column ’0′ seemed to do the trick:

// get data using OlapEngine
 var data = _c1OlapPage.OlapEngine.GetDetail(_c1OlapPage.OlapEngine.OlapTable.Rows[hti.Row - 1], _c1OlapPage.OlapEngine.OlapTable.Columns[0].ColumnName);

Everything was okay, it seemed, until I sorted the detail column in the OlapGrid. Then, the results seemed somehow inconsistent with the rows. When i stopped sorting, they were consistent again. I was using version 4.0.20123.123. Thinking it was version issue, I upgraded to v4.0.20131.132 and problem seemed to persist.

I downloaded the Northwind test application posted in the attached link and I was able to replicate the behavior with the app and the upgraded v4.0.20131.132 Olap library. This is how: I started application and used "Country" in the Rows Field and "ProductName" in sum field. In the default view, it works perfectly ("Argentina, 34 Products was the first row"). When I sorted ProductName, "Norway, 16 Products" is what should have be displayed in the first row but I still seemed to get "Argentina, 34 Products". When I sorted the other way, I should have gotten "USA, 352″ in the first row but I still seemed to get "Argentina, 34″.

BTW, I see that bug on 'var data=’ also seems to be fixed in that Northwind test app.

Please advise if you think I might have missed something during my testing.

Regards,
Mahapela


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>