QlikView Your Business. Troyansky Oleg. Читать онлайн. Newlib. NEWLIB.NET

Автор: Troyansky Oleg
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Зарубежная образовательная литература
Год издания: 0
isbn: 9781118949573
Скачать книгу
boxes.

      Since list boxes are presenting fields (for the most part; you’ll see the exceptions later), they are also called “fields” presented on the sheet, and the list of those fields can be managed from the Sheet Properties on the Fields tab.

      A list box can be created in two ways:

      ● A single list box can be created as any other sheet object can, by right-clicking on the screen and using the New Sheet Object option.One or more list boxes can be created in the Fields tab of the Sheet Properties, by selecting

      ● the desired fields from the list.

      Since list boxes can be created simply by naming the corresponding fields, you can conclude that the only essential setting of a list box is the field that it represents. The rest of the settings are assigned by default (many of those defaults are stored in Document Properties and some are permanently defined in the tool).

      Exercise 4.4: Creating List Boxes on the Template Sheet

      1. Activate the Template sheet and open the Sheet Properties (right-click on the screen and select Properties).

      2. Open the Fields tab and select four fields —Brand, Channel, Customer, and Style. Add the fields to the list of Fields Displayed in List Boxes using the Add button. You may add fields one by one, or select a group of fields by using Ctrl+Click.

      3. Exit the Properties window. The four list boxes should be created in the upper-left corner of the screen. Grab them by the caption (click and hold the left mouse button) and drag across the screen to position them along the left side of the screen, approximately in the middle between the top and the bottom.

By default, most list boxes show a list of field values in a single column. Sometimes you’ll prefer to show values in multiple columns. For example, two-character state abbreviations are best displayed in a multi-column grid. In addition, year and month list boxes are traditionally displayed as single line boxes, positioned across the top of the screen. Those settings are defined in the List Box Properties, on the Presentation tab (see Figure 4-6).

c04f006.tif

Figure 4-6: List Box Properties, Presentation tab

      Exercise 4.5: Creating Multi-Column List Boxes for Years and Months

      1. Open Sheet Properties, select the Fields tab, and add two more fields —Year and Month.

      2. Open the Object Properties (right-click the object and select Properties) for each one of the two new fields and configure the following:

      a. Sort tab: Uncheck Sort byState. You want the years and months sorted chronologically, disregarding the selection state.

      b. Presentation tab: Uncheck Single Column, uncheck Order by Column, check Cell Borders, and then center-align both Text and Numbers.

      c. Layout tab: Set Border Width to 0 pts.

      d. Caption tab: Uncheck Show Caption.

      You may need to resize the list boxes in order to force all the values into a single line, as displayed on top of the screen in Figure 4-5. Moving objects with no captions is a bit tricky. You need to position your mouse precisely at the top of the object. Alternatively, you can hold the Alt key and drag the object, pointing at its center.

      3. Save your work.

      Multi Box: A Space-Saving Compromise

      List boxes are great for displaying lists of values and unveiling associations between the selected items and other data fields. The only problem is they take a lot of valuable real estate on the screen. You might have more fields than you can fit on the screen, and the Multi Box is the solution for allowing more selections in a limited space.

In a multi box, multiple fields share the same object, and each field takes up a single line. The list of fields that should be displayed in a multi box is managed in the General tab (see Figure 4-7). Other than that, multi boxes share most of the common settings of the list box.

c04f007.tif

Figure 4-7: Multi Box Properties, General tab

      Sizing multi boxes is not as easy as sizing list boxes. Like any other multi-column objects in QlikView, multi boxes can’t be stretched by dragging the edges of the object. Each column within a multi-column object needs to be resized individually. Hover over the columns until your pointer turns into a resizing symbol. Drag the columns to the left and to the right as needed.

      In the next exercise, you create a multi box with additional fields that couldn’t be presented in individual list boxes.

      Exercise 4.6: Creating a Multi Box

      1. Right-click on the screen and select New Sheet Object⇒Multi Box.

      2. Type Other Filters as the title of the object.

      3. Select the following fields to be displayed in the multi box: Salesperson, Product Group, Product, Season, Size, and Color. Press OK to confirm all the changes.

      4. Drag the new object across and position it on the left side of the screen, below the list boxes.

      5. Save your work.

      Table Box and How It Should (Not) Be Used

      A Table Box is a simple object that shows a table of data values from multiple fields. For example, a table box with customer names, addresses, and phone numbers could serve as a short list of customers to call.

Table boxes are easy to configure. The desired fields are selected from a list of all fields on the General tab of the Table Box Properties (see Figure 4-8). At the same time, the usefulness of the table box is somewhat limited. Unlike the straight table chart, which you learn about later in this chapter, table boxes don’t allow you to aggregate the data. Table boxes are also known to perform poorly with large data sets, because they are not as good at memory management as the straight table chart.

      Our recommendation is to use table boxes only for “quick and dirty” development needs, like data validation. At the same time, table boxes should not be used in any production applications. Even if you need to show a simple list of data items with no aggregation, a straight table chart with no expressions is a better choice, for its better performance. These comments will be clearer after we introduce the straight table chart later in this chapter. For now, just remember that table boxes are not the best choice for production use.

c04f008.tif

Figure 4-8: General properties of a table box

      Using Text Objects for Labels, Images, and Backgrounds

      Text Objects can play many roles in a QlikView application – they can carry simple texts and calculated texts, show images, or serve as a background for other objects.

      In QlikView, all the text in the text object has to carry the same attributes – the same color, font, font size, and so on. In Chapter 16, you will see how it’s different in Qlik Sense, but for now you have to stick to the consistent formatting for the text within the text object.

Most of the important properties of the text box are defined in the General tab (see Figure 4-9). For most of the text boxes, it’s enough to enter the text and/or define the background. Horizontal and vertical alignment options help position the text and align it properly within the boundaries of the object.

c04f009.tif

Figure 4-9: