Skip to main content

Posts

Showing posts with the label Cube

Generate SQL query for GL transactions [AX 2012]

In my last blog I did a demonstration of using an SQL query to build a PowerBI report for the general ledger transactions. I hard coded the RecId for the financial dimensions. It might be cumbersome to build the query manual. So here I wrote a job you could run to get the query. It will spit out an infolog which you should be able to copy and paste. static void navax_generateGLQuery(Args _args) {     DimensionAttribute  dimensionAttribute;     str                 sqlStatement, dimNameStr, dimMaxStr, name;     sqlStatement =     @'         SELECT         GeneralJournalCube.*         %1         FROM GeneralJournalCube INNER JOIN         (     ...

How to find out why a cube based report isn’t working [AX 2012]

Lets say the Vendor top 10 report is throwing an error and you find out that it is based of the OLAP. You are sure you have deployed your cube and it is working. Open up the report in visual studio and go to the datasets. You will see the data source is DynamicsAXOLAP and there is a query. Copy the query. Go to SQL management studio and create a new query (mdx query – by connecting to your cube database). Paste the query and change any parameters – in this case I changed the company and the date (hard coded it in the query). Then Execute the query – you should see a result at the bottom. You will see some of the reports are depended on multiple cubes. Even though you were not using the General ledger cube the report uses it to retrieve the dates.