One of my favorite features and probably the most useful from a development perspective is the ability to show different objects (or the same object with different sizes) depending on the available space on the screen. Imagine having multiple documents loaded at the same time, one above the other, only the topmost is visible, and they flip when you rotate the screen. The most appropriate document for the screen size is visible, while the others remain in the background. So, we can define a single document with multiple views: for landscape iPad, portrait iPad, smartphone, and so on. MicroStrategy will try to match the space of the device to the closest available view. No need to tilt your head anymore!
We will create a double-view document and see the result on the iPad screen. You should have completed the previous recipes of this chapter to continue.
We start from the home page of our COOKBOOK project:
1024
.The default 1024 x 768 view is listed as Current View.
Portrait View
and change the Resolution to 768x1024, in the Orientation dropdown pick Portrait Only and set previous Original view to Landscape Only.1
Left and 1
Top (pixels).1022
and Height: Fixed to 702
.1
and Top: 1
766
and Height: 95840 iPad Landscape Portrait views
.When a document has Supported Orientations set to Portrait and Landscape, if multiple views are available, MicroStrategy app will match the current orientation and resolution to the view that best fits the screen.
You can add grids, graphs, and more to the views and decide if that particular object is always visible or it is shown only in the currently selected view. So, for example, if you have a company logo you can set this to appear in each view by answering Yes to this message:
Add two different grids on the document number 40; one in the Landscape layout and the other in the Portrait one. You can use different attributes, so that you give the user two different perspectives, for example, Sales by Month in one and Sales by Category in the other.
How would you add an image to both views? If the image doesn't fit in Portrait View, how would you resize it?