MicroStrategy ONE

Freeform SQL reports for Excel - Step 4: Creating a Freeform SQL report from Excel files

You must complete Step 1: Preparing the Excel File, Step 2: Setting up the data source (ODBC), and Step 3: Creating a database instance for the Excel file before performing the following steps.

  1. From the File menu in MicroStrategy Developer, select New and then Report. The New Grid Dialog box opens.

  2. On the Freeform Sources tab, in the Source area, select the database instance you created in Step 3, Creating a database instance for the Excel file.

  3. Select Create Freeform SQL report and click OK. The Freeform SQL Editor opens.

  4. In the SQL Statement pane, type in your SQL query.

    • Column names in the SQL statement have to match the column headers in the Excel file.

    • Case does not matter, as long as the column names are correct.

    • Do not use the Excel file name as the table name for the "From" clause. Use the table name instead. Remember that the Excel file is the data source that contains the tables.

  5. In the Mapping pane, map the columns in your SQL statement to attributes and metrics to be used in the MicroStrategy report.

    • When mapping the columns, it is important that you follow the same sequence of the column selections as they appear in the SQL statement. Doing otherwise causes the report to fail.

    • Ensure the number of mappings is the same as the number of columns in the SQL statement. For example, if your SQL statement lists 10 columns from which to retrieve data, you should map them to exactly 10 objects, including attributes and metrics.

    • For each attribute, you must map a column to the ID form.

  6. Perform other tasks as needed. See Creating a Freeform SQL report for more information.

  7. Click OK to close the Freeform SQL Editor. The Report Editor opens in Design view by default (see Report Editor for Freeform SQL reports).

  8. From the File menu, click Save or Save As. The Save Report As dialog box opens.

    You must save the report before you can run it.

  9. Enter a name for the report and click Save to return to the Report Editor.

  10. Run the Freeform SQL report.