Replied 3 August 2017, 7:03 am EST
Sometimes, i'm getting memory exception with just 5 records also. This happens only if more
fields are selected in the grid - like around 10-15 Attributes, 4 Measures.
Out of memory exception occurred in below scenarios:
- When more Attribute fields are selected in the grid and when I try to drag/drop measure field to Data shelf.
- In case I already saved layout view definition and try to apply it to PivotView (as you see in the below code, pivotview1.read....)
- When I try to pre-select all fields in the grid. Error is thrown when I commit the layout changes.
Below is the code I'm using:
//Use the ILayoutActions interface
GrapeCity.ActiveAnalysis.Layout.ILayoutActions myLayoutActions = pivotView1.BeginLayoutUpdate(&quot;init&quot;);
//Set the Marking type to Circle.
foreach (DataColumn column in dt.Columns)
if (column.DataType == typeof(string))
myLayoutActions.AppendField(&quot;[Dimension].[&quot; + column.ColumnName + &quot;]&quot;, GrapeCity.ActiveAnalysis.Layout.ShelfKind.RowShelf);
myLayoutActions.AppendField(&quot;[Measures].[&quot; + column.ColumnName + &quot;]&quot;, GrapeCity.ActiveAnalysis.Layout.ShelfKind.DataShelf);
myLayoutActions.AppendField(&quot;[Measure Names]&quot;, GrapeCity.ActiveAnalysis.Layout.ShelfKind.ColumnShelf);
//Commit the layout actions to the viewer.
Please let me know if I'm doing something wrong.