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

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

      For text objects that carry images, it’s important to choose the right Image Stretch option. When the object is sized differently than the original image size, this option will determine how the image should fill the size of the object. The most useful option that helps avoiding distortion of the image is Keep Aspect.

      In the following exercise, you create and configure a number of text objects that are used in the Sales Analysis template.

      Exercise 4.7: Creating Text Objects

      A number of text objects need to be created for this template. Use Figure 4-5 as the visual guide.

      1. Create a new text object that will carry the sheet title (Right-Click⇒New Sheet Object – you know the drill…).

      a. Type Template in the Text box.

      b. Make the Background fully transparent by sliding the Transparency slider fully to 100 %.

      c. Fonts tab: Use Font Size 22, color RGB(0, 100, 200).

      d. Layout tab: Set Border Width to 0 pt. Press OK to confirm.

      e. Position the object on top of the screen, almost all the way to the left.

      2. Create a new text object that will carry the icon next to the sheet title:

      a. Leave the Text empty.

      b. For the Background, use Image. Click on Change and find an icon image in the subfolder called \Icons. Pick an image of your choice. Under Image Stretch, pick Keep Aspect. Click OK to confirm the changes.

      c. Position the image in the upper-left corner, to the left of the sheet heading.

      3. Create a new text object that will carry the logo in the upper-right corner of the screen.

      a. Leave the Text empty.

      b. For the Background, use Image. Click on Change and find the logo image in the subfolder called \Icons. Alternatively, you can use any other logo of your choice. Under Image Stretch, pick Keep Aspect. Click OK to confirm the changes.

      c. Position the image in the upper-right corner of the screen.

      4. Create a new text object that will provide a gray ribbon outlining the header from the rest of the screen:

      a. Leave the Text empty.

      b. For the Background, use Color. Open the Color dialog and define the gray color as RGB(200, 200, 200).

      c. Layout tab: Border Width=0, Layer – Bottom.

      d. Caption tab: In order to ensure precise position of the object, enter the exact coordinates and sizes in the bottom-left corner: X-pos=0, Y-pos=41, Width=1,240, and Height=40. Click OK to confirm.

      e. Ensure that the previous three text boxes fit nicely above the gray ribbon. Position the list boxes for Year and Month on top of the gray ribbon, approximately in the middle.

      5. Create another gray text object, which will serve as the bottom outline of the page. It is very similar to the object created in Step 4, with the only difference in size and position. On the Caption tab, set X-pos=0, Y-pos=800, Width=1,240, and Height=6.

      6. Save your work.

NOTE

      This template is optimized to fit nicely in a screen with the resolution of 1280x1024. If you want to develop a template that works for a different screen size, tweak these suggested sizes and positions accordingly.

      Line/Arrow Object

The name says it all – with this object, you can create lines or arrows on the screen, as a simple means of dividing the screen into sections. Figure 4-10 shows the General properties of the Line/Arrow object.

c04f010.tif

Figure 4-10: General properties of the Line/Arrow object

      A line can be horizontal, vertical, or diagonal. You can set the Line Style, Line Weight, and Arrow Style properties, along with Color and Background Color properties, to define the look and feel of the line.

      In most cases, the background color should be set to transparent to avoid overlapping with surrounding objects.

      Pay attention to the exact size of the Line/Arrow object (Object Properties, Caption tab). The width of the object defines the length of the line (that is, for a horizontal line). The height appears to be unimportant; however, we recommend leaving it at the default setting (48 pts). Making line objects too narrow leads to visible distortions of the line, so it’s best not to make the size too narrow. Keeping the background transparent helps avoid any space issues.

      In the following exercise, you add a thin vertical line to separate the list boxes from the charts.

      Exercise 4.8: Adding a Vertical Line to the Template Sheet

      1. Create a Line/Arrow object. Set the orientation to Vertical. Set the Arrow Style to be a straight line with no arrow heads.

      2. Set the color to RGB(200, 200, 200).

      3. Set the background color to fully transparent. Open the Color Area window and slide the Transparency slider all the way to 100 %.

      4. Layout tab: Layer=Custom-5 (this will position the object below Bottom).

      5. Caption tab: Enter the position and size manually. X-pos=250, Y-Pos=80, Width=48, and Height=705. Click OK to confirm.

      6. Verify that the line connects between the two gray ribbons with no gaps and no overlap. Adjust as needed.

      7. Resize and reposition the three list boxes and the multi box to fit nicely on the left of the new line. You set the width and the exact position of these objects later in this chapter.

      8. Save your work.

      Mind Your Selections: Search Object and Current Selections Box

      Search Object and Current Selections Box are two commonly used objects. We recommend adding them to every analytical application and finding a prominent place for them in your document templates.

      Search Object

      The Search object is extremely useful and is easy to configure. It provides users with convenient Google-style search capabilities across multiple fields in the data set. It is especially useful when the user is not sure where to look for certain text. For example, you might have an order number, but you're not sure if it's an original order number, or the customer's order number, or some sort of a reference order number. Typing the number in the search box will reveal a short list of fields that contain the desired text. Then you can make the selection in the field of your choice.

Configuring a search object is extremely simple. In the General tab (see Figure 4-11), you can decide if you want to allow search across all fields, provide a list of fields, or manually pick selected fields to be allowed in the search.

c04f011.tif

Figure 4-11: General properties of the search object

      All Fields is the quickest and the easiest setting, but the search may get confusing in a large application with many fields and cryptic codes that the users may not understand.

      The List of Fields uses a semicolon as a separator and can include wildcards. For example, entering Customer* will lead to including all the fields that begin with the word Customer, while entering *Name will lead to including all the fields that end with the word Name.

      Selected Fields may not be as flexible,