//Get cube related data in AX 2012
//Prerequisite
//Add new references node in AOT
Microsoft.AnalysisServices.AdomdClient
static void SSLSSASCubeData(Args _args)
{
str cubeConnectionString, cubeQuery, value;
int i, rowCount;
System.Data.DataTable dataTable;
System.Data.DataRowCollection collection;
System.Data.DataRow row;
System.Object object;
Microsoft.AnalysisServices.AdomdClient.AdomdConnection Conn;
Microsoft.AnalysisServices.AdomdClient.AdomdDataAdapter dataAdapter;
cube
ConnectionString = 'Data Source=SSAS_SERVER;Catalog=SalesCube';
cube
Query = 'Select SalesNum from SalesCube';
dataTable = new System.Data.DataTable();
Conn = new Microsoft.AnalysisServices.AdomdClient.AdomdConnection(cubeConnectionString);
d
ataAdapter = new Microsoft.AnalysisServices.AdomdClient.AdomdDataAdapter(cubeQuery, Conn);
d
ataAdapter.Fill(dataTable);
collection = dataTable.get_Rows();
rowCount = collection.get_Count();
for (i = 0; i < rowCount; i++)
{
row = collection.get_Item(i);
object = row.get_Item(0);
value = object.ToString();
info(strFmt('%1. %2', i+1, value));
}
Conn.Close();
}
Monday, September 11, 2017
Get SSAS cube related data in AX 2012
Subscribe to:
Post Comments (Atom)
Convert Call stack to readable format in D365FO X++
//Input --container _xppCallStack = xSession::xppCallStack(); Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...
-
Restore .bacpac file to Development VM Steps: 1. Take Backup of AxDB database from Development VM 2. Open Command Pr...
-
Posting Vendor invoice based on Product receipt public void postPurchaseInvoiceJournal() { VendPackingSlipJour vendP...
-
Code for reserve and unreserved sales order lines Inputs : SalesLine, InventDim (Combination to reserve), Qty Note : To Reserve -> Pass...
No comments:
Post a Comment