Designer XI (To Print) PDF
Designer XI (To Print) PDF
San Diego, CA 92122 Printed in USA Copyright 2006, 2007 by Robert D. Schmidt. All rights reserved. No part of this manual may be reproduced or transmitted in any form, by any means without the prior written permission of the publisher. For authorization to reproduce this manual for corporate internal use only, not for resale, but for training in a classroom environment, contact: Schmidt Ink, Inc. email: [email protected] www.schmidtink.com Other Schmidt Ink, Inc. Publications: Creating Documents with BusinessObjects Creating Documents with BusinessObjects: Report Writing Course Creating Documents with BusinessObjects: Web Intelligence Course Creating Documents with BusinessObjects: Desktop Intelligence Course Creating Documents with BusinessObjects XI: Web Intelligence XI Course Creating Documents with BusinessObjects XI - CBT: Web Intelligence XI Course Limits of Liability and Disclaimer of Warranty The author and publisher of this book have used their best efforts in preparing the book and the examples contained in it. These efforts include the development, research and testing of the theories and examples to determine their effectiveness. The Author and Publisher make no warranty of any kind, expressed or implied, with regards to the examples and documentation in this book. The Author and Publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance or use of the examples contained in this book. Trademarks: BusinessObjects, Designer, and Universe Repository are trademarks of Business Objects, SA. Microsoft and Excel are trademarks of Microsoft Corporation. All other product and company names mentioned are trademarks of their respective companies.
0-9722636-3-2 (978-0-9722636-3-4)
I dedicate this book to my family. I also dedicate it to all the readers that trust my books to help further their knowledge and careers. I appreciate your trust and thank you for the motivation that you give me.
Introduction
Thank you for purchasing the Creating Universes with Designer XI computer-based training (CBT) course. I hope it provides you with the reference and training material that will help you to become a competent Business Objects professional. Throughout this course, we will examine many topics on creating universes. Most of these topics will reference a database called SI Data. The SI Data database is delivered on the accompanying CD in a Microsoft Access database. You may use this database directly, or import it into SQL Server. Importing it to SQL Server is recommended, because some of the functions in this book are SQL Server specific. However, the completed universe should work with SQL Server or Oracle. The database contains data from an investment company that had a one-year portfolio fund. In this fund there were six portfolios that traded stocks from their respective industries. The data also includes calls to clients and the daily prices of included stocks. It is also better if you can export your universe into a Business Objects repository, as we will create a linked universe in this course. Link universes require a repository for security (CMS). If you do not have a repository set up, you will still be able to do most of the examples in the book. The CD does not contain a demo version of Business Objects software. It is assumed that you have the product and that it is set up and running. The CD does contain a PDF presentation file. This presentation can be used to present the material to your fellow employees. You may not print this PDF or distribute it to anybody, other than yourself, as this is a copyright violation. However, you may purchase the books directly from the distributor at a discounted price so that everybody viewing the presentation has a book. Please contact me at [email protected] for discount information. If your company has many people to train in Business Objects Designer, Web Intelligence, and Desktop Intelligence, then you may be interested in the Corporate Training Package. This package gives a company limited rights to reproduce the manuals in order to train their employees. Please contact us at [email protected] for more information. You may also contact me at this address, if you have any questions on any of the exercises in the book. Please also send any comments and suggestions that you may have. Business Objects often seems like a very complicated application and there may be times that you become confused and need help. To search for help on specific issues, you can visit: http://www.forumtopics.com/busobj, which is an exceptional forum, known as BOB. I very much appreciate you trusting my book/CBT to help further your understanding of Business Objects universes. I have spent many hours developing the course in hopes that it will be the best computer course that you have ever taken. Sincerely, Robert D. Schmidt [email protected] www.SchmidtInk.com
Conditions Defined
Notes
Creating Conditions
To access the Conditions pane in the Designer, click on the Yellow Filter Funnel located beneath the Classes and Objects (Universe) pane.
Creating Conditions
Conditions are accessed in the Conditions pane of the Universe workspace. To access the Conditions pane, click the Yellow Filter Funnel located beneath the Classes and Objects (Universe) window. All condition objects in the universe are located in this pane. To insert a Condition object, you can right-click on a class or object in the Universe section and select Condition... from the pop-up menu. You can also use the Editing toolbar or the | Insert | Condition... | menu item. All of these actions will display the Edit Properties dialog where you can create a new condition object or modify an existing one. The Edit Properties dialog has three fields: Name, Description, and Where. There is no Select field, as there was in the Edit Properties dialog for result objects. To create the condition, we simply enter the condition logic in the Where field of the dialog. Many times, it is more convenient to click the >> button to display the Edit dialog. With this dialog, we can access fields from tables, result objects, operators, and local database functions. Since it is better (easier to maintain) to use existing objects (as opposed to columns in tables), we usually use the objects in the Classes and Objects section of the dialog. When we double-click on an object, it will appear in the formula field. It will be enclosed within the @Select statement, which simply inserts the SQL from the Select field of the Edit Properties dialog for the object into the Where condition that we are working on. Notice that the object is referred to as Class/object within the @Select statement. This is why we cannot have two classes with the same name, because it will confuse the @Select function. Most conditions are defined by an object, operator, and an operand. In the case in the graphic, the object is Ticker, the operator is Equal to, and the operand is the constant: BOBJ. Over the next few slides we will create various condition objects for our universe. Exercise: Create a Simple Condition Object 1. Click on the Yellow Condition Funel, located beneath the Classes and Objects section of the Designer. 2. Right-Click on the class name and select Condition... 3. Enter Business Objects into the Name field. 4. Enter Limits data returned to Business Objects, into the Description field. Notes 5. Click on the >> button to display the Edit dialog. 6. Locate and double-click Ticker in the Classes and Objects section. 7. Double-click on the equal sign in the operators section. 8. Type BOBJ 9. Click the Parse button to check the condition. 10. Click the OKs to exit all dialogs and create the object.
Edit Condition Dialog for Company Ticker The @Prompt Funtion is Found in the @Functions Section
@Select(Portfoliotransactions\Ticker) IN @Prompt('Enter Ticker(s)', 'A', 'Portfoliotransactions\Ticker', multi, free) The @Prompt Allows User Input at Refresh Time
We customize the prompt function with the arguments. For example, suppose that you wanted everyone to select values from a prefabricated list, and then the function could look something like: @Select(Portfoliotransactions\Ticker) IN @Prompt('Enter Ticker(s)', 'A', {'BOBJ','INTC','RMBS'}, multi, Constrained) Exercise: Create a Prompted Condition 1. 2. 3. 4. 5. Click on the Yellow Condition Funnel located beneath the Classes and Objects window. Click the Condition... toolbar button. Enter Company Ticker into the Name field. Enter Enter Tickers at prompt. Can select Tickers from the Values list into the Description field. Enter @Select(Portfoliotransactions\Ticker) IN @Prompt('Enter Ticker(s)', 'A', 'Portfoliotransactions\Ticker', multi, free) into the formula field. Hint: For the list of values, type a single quote, then double-click on the Ticker dimension object in the Classes and Objects section. This will enter the list in the proper format. Sometimes, the object will enter the formula with the @Select function. If the @Select does appear, then simply delete the function and parenthesis, but leave the argument, which will be in the correct format.
Notes
Notes
@Select(Portfoliotransactions\Ticker) IN @Prompt('Enter Ticker(* for All)', 'A', 'Portfoliotransactions\Ticker', multi, free) Or '*' IN @Prompt('Enter Ticker(* for All)', 'A', 'Portfoliotransactions\Ticker', multi, free)
Notes
@Select(Portfoliotransactions\Price) * @Select(Portfoliotransactions\Number of Shares (Dem)) * (-1) > (Select Avg(PORTFOLIOTRANSACTIONS.PRICE * PORTFOLIOTRANSACTIONS.NUMSHARES * (-1)) From PORTFOLIOTRANSACTIONS Where Year(PORTFOLIOTRANSACTIONS.TRANSDATE) = 2001 )
Notes
Date Conditions
Prompted YTD @Select(Portfoliotransactions\Transdate) BETWEEN '1/1/' + Cast(Year( @Prompt('Enter Date', D, 'Portfoliotransactions\Transdate',,)) As Varchar(4)) AND @Prompt('Enter Date', D, 'Portfoliotransactions\Transdate',,)
Date Range
@Select(Portfoliotransactions\Transdate) BETWEEN DateAdd(dd, -90, @Prompt('Enter Date', 'D, 'Portfoliotransactions\Transdate',,)) AND @Prompt('Enter Date', 'D, 'Portfoliotransactions\Transdate',,)
Date Conditions
Dates are implemented in many different fashions in todays data warehouses. Sometimes conditions are fast and easy to create. In these cases, the data warehouse usually has a date table with every conceivable attribute of a date. However, there are times that there is only a date to work with, as in the case of SI Equity. In these cases, we need to perform some kind of date logic to get the date ranges that we are interested in. Most of the time, if the database is indexed efficiently and there are not millions of rows, this type of date manipulation is efficient enough. There are many ways to implement date conditions. Two of the most popular are to use a date table or to use date functions. In this chapter, we will use the SQL Server date functions. We have three examples in the graphic - Prompted YTD, Date Range, and Rolling 90 Days. Of the three, the Date Range condition will be the most efficient, because it will utilize the indexes in the most efficient manner. The other two may not work as well, because they may cause table scans. However, we got to do, what we got to do, to get the job done. If a date is all we have to work with, then so be it let's create the date conditions. Notice that each condition starts with the same statement: @Select(Portfoliotransactions\Transdate) BETWEEN. This statement is just pointing to the Trans Date object, which is the Transdate field in the PORTFOLIOTRANSACTIONS table. The next line in the statements is defining the start date in the range. The YTD condition uses the first of the year '1/1/' concatenated to the year of the input date, which is found with the Year function. The Cast function converts the Year to a character, so it can be concatenated. The Rolling 90 Days, uses the DateAdd function to subtract 90 days from the input date. Finally, the Date Range just uses the Begin date entered by the viewer of the report. The final line in each statement just uses the inputted date as the range's end date. Since we are using the Between operator, the end date is inclusive of the range, which means that it will include the date in the query. You can see that with SQL Server and a little imagination that we can build date conditions that can do almost anything that we need them to. The available functions are Year, Month, Day, GetDate, DateAdd, DatePart and DateDiff. We may also need some other support functions, such as Cast to force types. Notice that in the prompt functions that I did not populate the last two arguments. This is because the operator will assign the default to the Mono/ Multi argument. For example, if it is an equal to operator, then only one value can be entered. The Free/Constrained argument defaults to Free. Free is a good option for dates, because most people will not mistype a date - even if they do, they usually realize right away. Exercise: Create the Three Date Conditions Shown in the Graphic Notes
Chapter Summary
Chapter Summary
In this chapter, we learned the importance of condition objects. We also learned how to create simple and complex conditions. Many universes have too many or not enough condition objects. I guess finding the right balance for your company will take some discovery. I also think that it is better to err on the side of having too many conditions than not enough. It is also important to know how people may use or interperate your conditions. For example, in this chapter, we created a subquery condition. This subquery of this condition will return the average trade revenue in the year 2001. Then the complete condition wiill compare the revenue on each row of the database to this average revenue. If it is larger, then it will return the row. If people do not understand this behavior, then they may assume that it does something else. Having standardized conditions allows all reports to use the same condition logic. This logic is usually based on business rules in the company. Therefore, they are very effective at keeping reports consistent throughout the company.
Notes
Symbols
!Unknown 85 @Aggregate_Aware 149 @Prompt 63, 67, 71 @Select 41, 43, 47, 53
A
Aggregate Awareness 149 ANSI92 21 Associate a List of Values 31 Automated Context Detection 113
ODBC 11 Context Candidates 113 Contexts 111 Automatic Definition 113 Deleting 117 Insert 139 Join Cardinality 117 Manual Creation 117 Viewing 115
D
Data Manager 37 DateAdd 71 Decode Property Flags 101 Derived Tables 153 Detail Objects 87 Dimension Table 77 Dimension Table Loops Universes Table Loops 133 Dimensions 29 Properties 31 Distinct 43, 51 DSN 3 Duplicate row aggregation 53 duplicate row aggregation 37
B
Between Joins 171 Browser 25 Building-block universes 105
C
Candidate Contexts 113 Cardinalities 113 Case Statement 101 Chasm Trap 93, 97, 109 Class folders 29 Classes Default 29 Unique Names 61 Classes and Objects 61 Create 83 Default 83 Columns Viewing Values 27 Conditions All or Selected 67 Creating 61 Creating Prompted 63 Date 71 Date Table 123 Defined 59 Pane 61 Subquery 69 Connection Define a New Connection 13 Disconnect after each transaction 15 Keep the connection active during the whole session 15 Keep the connection active for x minutes 15 Login 5
E
Edit Properties Condition 61 Exporting 35
F
Fact Table 77 Fan Traps 141 Invoice Type 147 Unsolvable 145
G
Group By 53
H
Heirarchies 151 Hieracrhy Automatic Time 45 Hierarchy
Manual Creation 47
I
Import 35 Index Awareness 165, 167 Index Prompt 167 Integrity Check 51, 53, 177
J
Join Cardinalities Joins Cardinality 89 Joins 79 Advanced Join Propertie 175 Between 171 Chasm Trap 93 Different Data Types 155 Fan Traps 141 Inner Join 79, 99 Outer Join 99 Shortcut 173
Behavior 37 Default 29 Detail 87 Dimension 29 Formatting 49 Hiding 169 List of Values 33, 159 Measure 39 Qualification 31 Using Conditions 93 ODBC 13
P
Parameters Controls 19 Links 21 Parameters 21 SQL 19 Strategy 19 Summary 19 Parse 41, 51, 53 Primary Key 165 Printing 181 Property Tables 91
L
List Mode 115 List of Values 33 Cascading 163 Export with Universe 161, 167 Hierarchical Display 161, 167 Login 7 Look-up Table 77 LOV 167 LOVs 161 Cascading 163 Export with Universe 161 Sortings 159
Q
Quick Design Wizard 9
R
Refreshing the Structure 177 repository 17
S
Shortcut Joins 173 SQL 55 SQL Function Cast 71 DateAdd 71 Year 71 Structure Arranging the Tables 179 Refreshing 177
M
Measures 39 Counting 43 Creating 41 middleware 13 Multiple SQL Statements for Each Measure 143
O
Objects !Unknown 85
T
Table Browser 25 Tables
!Unknown 85 Alias Tables 95 Aliasing 133 Date 121 Derived 153 Dimesion 77 Fact 77 Field Types 81 Insert 25 Locate 115 Look-up Table 77 Multiple Fact 107 Show Format 81 Show Row Count 81 Transactions table 77 Underline Keys 81 Viewing Values 27
Y
Year 71
U
Universe Arranging 119 Exporting 35 Universe Parameters 13 Controls 19 Definition 11 Links 21 Parameters 21 SQL 19 Universes Export 125 Heirarchies 151 Insert Context 139 Integrity 51 Linking Linking Universes 129 Logical Groups 127 Loops 131 Multiple Fact Tables 139 Save 125 Summary 135 Using Conditions 93
V
Views 153
W
Workspace 23
Exercise: Place EQUITY PRICES in the SIEquity Universe 107 Exercise: Join the EquityPrices table to Company 109 Exercise: Automatically Detect Contexts in Our Universe 113 Exercise: View the Universe in List Mode 115 Exercise: Delete Portfolio Transaction Context and Manually Redefine It 117 Exercise: Create Easy to Use Universe Structure 119 Exercise: Remove all Date Objects and Replace with Common SIDate Objects 123 Exercise: Save and Export Universe 125 Exercise: Create Separate Company Universe 127 Exercise: Link the Company Universe to the SI Equity Universe 129 Exercise: Add the SICALLS Table 139 Exercise: Add the CallCompanyContacts table to the Universe Structure 141 Exercise: If you have a Reporting Tool Create the Query With and Without the Option 143 Exercise: Create a Universe with XBCustomer, XBINVOICE, and XBINVOICEITEM 147 Exercise: Create Aggregate Awareness in Paintball Invoice Universe 149 Exercise: Create a Custom Heirarchy 151 Exercise: Create a Derived Table 153 Exercise: Sort the LOV for Portfolio Name 159 Exercise: Create a Hierarchical List of Values 161 Exercise: Create a Cascading List of Values 163 Exercise: Define Index Awareness for Mgr Name 165 Exercise: Create an Index Prompt 167 Exercise: Print Preview SI Equity - Designer Course 181