Editing the query

Queries can be edited in order to adjust to the evolving requirements of the report. Through my work, I have come to know a simple fact: most reports are edited at one stage or another.

Editing is easy and is conducted in the same way a query is created, that is, by adding objects to the query or by removing some of them.

Getting ready

We want to extend the current query definition and add the model dimension to it so that we can analyze the sales data at a more detailed level.

How to do it...

On the report screen, we will click on the Edit button under the Data Access ribbon; this will open the Query Panel.

We will drag-and-drop the Model object and run the query.

The result table will remain the same. In order to present the additional object that we added to the query, we will drag Model from the Available Objects panel to the existing table, as shown in the following screenshot:

The final table will now display the new object as well, showing for each category the model and sales. Have a look at the following screenshot:

How it works...

As we saw, the query can be easily edited, and once an object is added to or deleted from the query, a new query run is required in order to reflect the changes in the query structure.

Note

The nature of measures is dynamic. The display of aggregative-level measure objects is dependent on the dimensions and/or the attribute objects presented with them.

There's more...

You can also add objects to the query by double-clicking on an object name. Objects can be deleted from a query by dragging-and-dropping, using the X button, or simply pressing the Delete key on the keyboard.

It is also possible to run a search for object names in the universe outline. By typing in the object's first letter(s), we will be able to run a search and find objects whose names begin with those letters, as shown in the following screenshot:

Tip

You can also find objects by marking one of them in the Result Objects pane. The class contacting that object will immediately open and show its exact location in the universe outline.

One last point to note is that you don't have to run the query if you just need to build the query structure (let's assume the database is currently unavailable, so we can't run the query). To do this, you have to click on the Close button located on the right-hand side of the Run query button and choose Apply Changes and Close, as shown in the following screenshot. This action will save the query structure, go to the report screen, and enable us to save the report without data.