The process of creating a Business View that can be accessed by a Crystal Reports designer involves creating all the objects mentioned previously in a logical order. You must, for example, create at least one Data Connection before you can create a Dynamic Data Connection or a Data Foundation. You must use existing Data Connections to make up a Dynamic Data Connection. You must have at least one Data Foundation before you can create a Business Element. And, you must have one or more Business Elements to make up the final Business View.
Because of this required hierarchy, you must create these individual Business View objects in the proper order. Once you ve created them (and added them to the Crystal Repository), you may then base the higher-level Business View objects on them. And, after you ve created a variety of different Business View objects, you are free to create as many dependent objects as you need later on. For example, you may initially create four or five Data Connections to your organization s core datasources and then use them in any variety of Data Foundations now, or in the future.
As with Business Views themselves , the tool used to create and maintain them is entirely new with Crystal version 10. This Windows thick client application, called the Business View Manager, is installed by default when you perform a complete Crystal Enterprise installation. If you need to install the Business View Manager on additional computers outside the Crystal Enterprise server environment for additional Business View designers, you ll need to perform a custom installation from the CE program CD and choose the Business View Manager from the list of available client options.
Once you ve installed the Business View Manager (if necessary), start it by choosing the appropriate choice from the Crystal Enterprise 10 program group after clicking the Start button. The Business View Manager will appear, with an initial dialog box requesting you to log on to Crystal Enterprise. As Business Views are an integral part of the Crystal Enterprise repository, you must supply a valid CE Crystal Management Server name , user ID, password, and authentication type in order to create or modify Business Views. Once you ve logged in to CE, the Welcome to Business Views dialog box will appear inside the Business View Manager, along with the Repository Explorer. This is illustrated in Figure 17-1.
Note | Discussions regarding logging on to Crystal Enterprise, including authentication methods , can be found in Part II of this book, in Chapters 25 and 26. |
If you wish to work with the Business Views Manager toolbars and pull-down menus, you may simply cancel the welcome screen (you can display it later by choosing Help Welcome Dialog from the pull-down menus ). Or, you may click one of the three tabs to create a new Business View object, open an existing object from within the Crystal repository, or choose from a list of recently used objects.
If you wish to modify or examine any existing Business View objects, you may either choose the Open or Recent tabs in the initial dialog, or close the dialog and use the Business View Manager s pull-down menus or the Repository Explorer. For example, to use the Repository Explorer to open an existing Data Connection, simply navigate the folders of the Repository Explorer until you find the Data Connection you wish to open. Double-click the Data Connection to open it inside the Business View Manager.
Note | More detailed information on the Repository Explorer can be found later in the chapter, under Using the Repository Explorer. |
You may have any number of different Business View objects open inside the Business View Manager at a time. Each object will display a tab with the corresponding object type icon and object name across the middle portion of the Business View Manager. Simply click the desired tab to display that particular object. Use the LEFT ARROW and RIGHT ARROW keys to move between the tabs. When you re finished working with a particular object, you may click the small X to the right of the tabs and arrows to close the currently displayed object. Choices available in the Business View Manager pull-down menus and toolbar will vary, depending on the type of Business View object currently displayed.
You ll also notice several Business View Manager windows that typically appear, no matter what type of Business View object you are working on. The Object Explorer, Property Browser, and Repository Explorer windows appear within the Business View Manager. If you don t want to see any of these windows, simply click the X in the upper right-hand corner of the desired window. You can also uncheck the window name from the View menu. If you wish to redisplay the window, simply recheck the window name in the View menu.
While these windows are initially docked to one side or the other of the Business View Manager, you may undock them by clicking in their title bar and dragging. The chosen window will become free-floating, whereby it can be freely moved around your screen, even outside of the Business View Manager. To re-dock the window, drag it back into the Business View Manager until it snaps to a border of the main window ”you may need to try several times to snap the window back where you want it.
If you click the small pin icon next to the X in the upper right-hand corner of a window, you will auto-hide the window. If you move your mouse pointer away from the auto-hidden window, it will eventually shrink to the side of the Business View manager, only appearing as a tab. Auto-hiding windows allows more room for the core design portion of the Business View manager to appear. Pointing to a hidden window tab will expand the window for a few seconds, whereby you can manipulate any items within the window. When you wish the window to auto-hide again, simply click outside the window with your mouse and wait a few seconds. If you wish a window to reappear permanently, show the window again by pointing to its tab. Then, click the angled pin icon to show the window.
You may create a new Business View object by clicking the desired object type in the welcome screen. If you ve closed the welcome screen, click the New button in the Business View Manager toolbar to redisplay it. You may also choose File New from the pull-down menus, choosing the desired type of Business View object from the submenu.
Each type of Business View object is described in the following sections of this chapter. These sections illustrate a sample Business View that combines various data elements from the sample XTREME Mountain Bike database included with Crystal Reports, along with other related datasources. The sample Business View illustrated in the rest of this chapter includes the following characteristics:
Database connections to a test XTREME database stored on a local hard disk and to a production XTREME database stored on Microsoft SQL Server. When a report is created or run, the designer or viewer is given the choice of using test or production data.
A database connection to a Microsoft Excel spreadsheet that contains sales quotas for XTREME sales staff (the standard XTREME database doesn t contain any quota information).
A database connection to a comma-delimited text file dividing XTREME customer states into geographic regions , such as Northwest, Southwest, and so forth. The XTREME database doesn t include any geographic area designations.
A filter that limits the Business View to returning USA data only.
Column-level security that limits an employee annual salary field and employee monthly salary formula to members of the Human Resources department.
Row-level security that limits order display to a regional sales manager s geographic area. For example, a Western Regional Sales Manager will only be able to see orders placed by customers in the Northwest and Southwest. The National Sales Manager, however, will see orders in all regions when viewing the same report.
The first type of Business View object that you must create when starting a new Business View from scratch is a Data Connection. A Data Connection is simply a connection to a single database or datasource that you can use to build on later in the Business View design process. The Data Connection will consist of a single connection to a single datasource. If your entire organization s database can be accessed via a single database connection, then you may need to create only one Data Connection for all your Business Views. However, if you want your Business View to tie together several different databases, you ll need to create a new Data Connection for each database.
To create a new Data Connection, choose the Data Connection icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Data Connection submenu item. The Choose a Data Source dialog will appear after a new Data Connection is displayed in the Business View Manager, as illustrated in Figure 17-2.
Navigate through the folder structure of this dialog box to find your desired datasource (navigating this dialog box is similar to using the Crystal Reports Database Expert). Once you ve chosen the necessary datasource, you may be prompted to log on to a secure database server. Provide proper logon credentials to do so.
If you don t find the particular datasource connection you re looking for, you may need to run a separate database utility (such as the ODBC Administrator from the Windows control panel) to create the correct datasource. Once you ve done this, you may refresh the contents of the Choose a Data Source dialog box by clicking the lightning bolt refresh button at the upper left-hand corner of the dialog. The F5 key will also refresh this dialog box. Also, the available datasource categories that appear in the Choose a Data Source dialog box depend on what data connection choices you made when installing Crystal Enterprise components on your PC. If you don t see a desired database type, rerun Crystal Enterprise installation from the Control Panel or CE program CD and choose additional datasources.
Note | The Edit Options button to the right of the Refresh button will display a dialog box allowing you to limit the types of and names of tables you see in the Choose a Data Source dialog box. Since choosing tables is generally irrelevant when creating a Data Connection, you ll probably have little use for this option here. |
Once you ve logged on to the datasource, you will be able to expand the datasource you just connected to in order to see any tables, views, or stored procedures that are contained in that datasource. Don t let this ability confuse you ”even though you may be able to click one of these items within the datasource, you are not able to choose any individual tables, stored procedures, or views here. The Data Connection object merely is a connection to the database, and individual database elements, such as tables and views, are chosen and linked when you later include the Data Connection in a Data Foundation.
Once you ve chosen a datasource (and, you can only choose one per Data Connection object), you ll be presented with the Set Data Connection Password dialog box. Use this dialog box to confirm the user ID and password you want the Business View to use when connecting to this datasource in the future. If the database you chose is not secure (perhaps an Excel spreadsheet or unsecured Microsoft Access database), you may just cancel this dialog box. Or, if you always want the report designer or viewer to be required to specify a user ID or password whenever they use this Data Connection in a Business View, you may also cancel the dialog box.
Once you ve specified the user ID and password, and confirmed the password, you may choose whether to prompt the report designer or viewer for the ID and password to this datasource whenever the Business View is used. Note that if you choose to Never Prompt, the ID and password you specify here will be stored in the Crystal Enterprise repository and the Business View user won t have to specify the ID and password when they use the Business View.
Caution | If you plan on using this Data Connection as part of a Dynamic Data Connection (described later in this chapter), you should make sure to choose the Never Prompt option. Otherwise, you ll be unable to use this Data Connection object as part of a Dynamic Data Connection. Data Connections that are specified to Never Prompt for an ID and password can be further secured by setting Crystal Enterprise rights. This is discussed later in the chapter, under Setting Rights for Business View Objects. |
Once you ve specified the data source and user ID/password settings, the Data Connection will appear inside the Business View Manager. You ll see information pertaining to the particular datasource you chose (such as the database DLL used, timeout properties, and so forth) in the center portion of the Business View Manager. An automatically generated name for the Data Connection will appear in the tab above these properties, displayed with an asterisk (the asterisk indicates that this object has not been saved to the CE repository since being created or modified). Two boxes will appear on the left: the Object Explorer and the Property Browser.
While the Object Explorer is of limited usefulness in a Data Connection (since the Data Connection doesn t contain any child objects, such as tables or fields), the Property Browser plays an important role when working with a Data Connection. Here, you may specify various properties for the Data Connection that determine its appearance within the CE repository and its behavior. Click in the text area to the right of the property and type your desired value, click the drop-down list to choose from various options, or click the ellipses button to be prompted for additional values.
Name Type the descriptive name you wish this Data Connection to have when you save it to the Crystal repository.
Description Type an optional description to more fully explain the usage of this Data Connection.
Author Your CE user ID is specified here by default. You may change this text to something else, if you choose.
Parent Folder This read-only item will appear if you ve already saved the Data Connection, or you re modifying an existing Data Connection. It simply shows the location in the Crystal repository where the object is located.
User Name The user ID you specified in the Set Data Connection Password dialog box will appear. You may change the user ID in this box if you choose.
Password Asterisks will appear indicating the password you chose in the Set Data Connection Password dialog box. If you wish to change the password, click the ellipses to redisplay the Set Data Connection Password dialog box to set a new password.
Connection The datasource name you initially chose from the Choose Data Source dialog box will appear here. Click the ellipses to redisplay the Choose Data Source dialog box to change the datasource for the Data Connection to a different datasource. Alternatively, you may click the Edit Connection toolbar button, or choose Edit Edit Connection from the pull-down menus. You may also right-click the Data Connection name in the Object Explorer and choose Edit Connection from the pop- up menu.
Runtime Prompt Mode Allows you to choose whether to prompt for a user ID/password combination whenever a report designer or viewer uses this Data Connection in a Business view.
Use Owner Determines whether the database owner is included in any SQL query generated by this datasource. For example, if the database is owned by dbo (database owner), the resulting SQL query may look similar to this if Use Owner is set to True:
SELECT "Customer"."Customer Name"
FROM "xtreme"."dbo"."Customer"
whereas a False setting for Use Owner would result in:
SELECT "Customer"."Customer Name"
FROM "xtreme"."Customer"
Use Catalog Determines whether the database name is included in any SQL query generated by this datasource. For example, if the database name is xtreme, the resulting SQL query may look similar to this if Use Catalog is set to True:
SELECT "Customer"."Customer Name"
FROM "xtreme"."dbo"."Customer"
whereas a False setting for Use Catalog would result in:
SELECT "Customer"."Customer Name"
FROM "dbo"."Customer"
If both Use Owner and Use Catalog are set to False, the result would be:
SELECT "Customer"."Customer Name"
FROM "Customer"
Note | The Use Owner and Use Catalog options should typically be set to True. However, when using Data Connections within a Dynamic Data Connection, these settings may need to be set to False to ensure that datasources that expose supposedly identical organizations will return identical SQL queries even if owner and database names are different. |
Rights Click the ellipses to set rights for this Data Connection. Setting Business View rights is discussed in detail later in the chapter, under Setting Rights for Business View Objects.
Once you ve set any desired properties, you should save the object to the Crystal repository. In fact, you must save the object to the repository before you set certain properties, such as rights, or perform additional functions, such as checking dependent integrity. To save the Data Connection, click the Save button in the toolbar, press CTRL-S, or choose File Save from the pull-down menus.
The Save As dialog box will appear, which consists of an object name text box and an embedded copy of the Repository Explorer (discussed in more detail later in the chapter, under Using the Repository Explorer ). Choose the desired location for your Data connection by navigating to the desired folder, creating an additional folder, or selecting the root-level Crystal Management Server. If the name of the Data Connection isn t appropriate, change it in the object name text box. Then, click Save to save the Data Connection to the repository.
At any time, either before or after you ve saved your Data Connection, you may want to double- check that the datasource can be connected to successfully. By clicking the Test Connectivity button in the toolbar or choosing Tools Test Connectivity from the pull-down menus, you can ensure that the datasource name, user ID, and password you ve supplied will connect to the datasource properly. A message will appear indicating a successful connection or a descriptive error message.
You may also want to ensure that any changes you ve made to existing Data Connections don t adversely affect dependent objects. For example, if you created a Data Foundation or Business Element that depends on certain tables and fields in a Data Connection, that Data Foundation and Business Element will fail if you remove the original tables from the Data Connection. More information on checking dependency can be found later in the chapter, under Object Integrity and References.
Caution | Ensure that any datasources you choose when building your Data Connections are also installed on the Crystal Enterprise servers (Job Server, Page Server, Report Application Server) that will be running the target reports. If you use a datasource when building the Business View that isn t available on these servers, reports will fail when the Crystal Enterprise viewer attempts to run them. |
Recall that the sample Business View discussed earlier in the chapter will require connections to a production XTREME database on SQL Server, a test XTREME database from a local Microsoft Access database, an Excel spreadsheet containing sales quotas, and a comma- delimited text file defining geographic regions. Thus, a total of four Data Connections will need to be created to accomplish the ultimate Business View requirements:
XTREME Server ”Production A connection, via OLE DB, to a Microsoft SQL Server.
XTREME Local ”Test A connection, via ODBC, to the XTREME Sample Database 10 Access database.
Quotas ”Excel A connection, via the Access/Excel (DAO) driver, to the Excel spreadsheet containing quotas for each salesperson.
Regions ”Text File A connection, via ODBC, to a comma-delimited text file assigning a region of the country to each state.
A useful feature of Business Views is the Dynamic Data Connection. A Dynamic Data Connectio n allows the report designer or viewer to choose from two or more Data Connections to use whenever designing or running a report. This capability often satisfies the test vs. production requirement that organizations often have when running reports against multiple databases.
A Dynamic Data Connection is the only optional object within a whole Business View. While you can create a Dynamic Data Connection if you want to, you don t have to. Whereas a Business View will work without this object, at least one of every other Business View object type must exist to finish creating a complete Business View. However, because Dynamic Data Connections are based on existing Data Connections, you must create at least two or more Data Connection objects to make any use of Dynamic Data Connections.
To create a new Dynamic Data Connection, choose the Dynamic Data Connection icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Dynamic Data Connection submenu item. The Choose a Data Connection dialog box will appear after a new Dynamic Data Connection is displayed in the Business View Manager, as illustrated in Figure 17-3.
The Choose a Data Connection dialog box will simply show the folder structure of the Crystal repository. Navigate through the folder structure of this dialog box to find your desired Data Connection object (only Data Connections will appear when you open repository folders). If your repository contains a large number of Data Connections, you may use dialog box filters to narrow down the list of displayed Data Connections. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The dialog box will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only Data Connections that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of Data Connections will reappear.
Once you ve selected your first desired Data Connection, click the Add button. You can also just double-click a desired Data Connection. As you add Data Connection objects, you ll see them appear in the middle of the Business View Manager under the Dynamic Data Connection tab (you may need to move the Choose a Data Connection dialog box out of the way to see this). Once you ve chosen desired Data Connections, close the Choose a Data Connection dialog box.
Caution | Only Data Connection objects that don t prompt for database logon credentials can be used within a Dynamic Data Connection. If you attempt to add a connection that does prompt, you ll receive an error message. If you encounter such a connection, you ll need to edit it within the Business View Manager and set the Runtime Prompt Mode property to Never Prompt. Then, you may add it to the Dynamic Data Connection. |
Make sure that the Data Connections you are adding to your Dynamic Data Connection expose applicable database objects that are identical to the other Data Connections you add. For example, if you are planning on using the Orders, Customer, and Products tables from one Data Connection, ensure that other Data Connections also expose the same table names with the same set of relevant fields. The entire concept of a Dynamic Data Connection is to provide the exact same database organization, or schema, from multiple datasources.
Once you ve chosen your Data Connections, they will appear inside the Business View Manager. An automatically generated name for the Dynamic Data Connection will appear in the tab above the Data Connections, displayed with an asterisk (the asterisk indicates that this object has not been saved to the CE repository since being created or modified).
You may discover that you either have added a Data Connection that you don t want, or need to add additional Data Connections. To delete an existing connection, select it in the list (you may select more than one connection with CTRL-click or SHIFT-click) and press the DEL key. You may also click the Delete button at the bottom of the connections list, click the Delete toolbar button, or choose Edit Delete Data Connection from the pull-down menus.
If you need to add an additional Data Connection, click the Add button at the bottom of the connections list, click the Add toolbar button, or choose Edit Add Data Connection from the pull-down menus. The Choose a Data Connection dialog box will reappear. Navigate through the repository folders to find the desired Data Connection or Connections to add. Or, if you already see the Repository Explorer elsewhere within the Business View Manager, you can simply drag a Data Connection object from it directly to the list of connection objects.
When the report designer or viewer uses a Business View based on a Dynamic Data Connection, they will be given the choice of Data Connections from within the Dynamic Data Connection in a pick list, similar to that of a standard Crystal Reports parameter field. Data Connections will appear in the pick list in the same order as they appear here. If you wish to change the order that connections will appear in the pick list, click the desired connection and use the up or down arrows at the top of the window to move the connection up or down in the list. You can also sort the entire list in ascending or descending order by choosing an option for the Sort drop-down list to the right of the up and down arrows.
To the left of the Data Connection list, two boxes will appear: the Object Explorer and the Property Browser. While the Object Explorer is of limited usefulness in a Dynamic Data Connection (since the Dynamic Data Connection doesn t contain any child objects, such as tables or fields), the Property Browser plays an important role when working with a Dynamic Data Connection. Here, you may specify various properties for the Dynamic Data Connection that determine its appearance within the CE repository and its behavior. Click in the text area to the right of the property and type your desired value, click the drop-down list to choose from various options, or click the ellipses button to be prompted for additional values.
Name Type the descriptive name you wish this Dynamic Data Connection to have when you save it to the Crystal repository.
Description Type an optional description to more fully explain the usage of this Dynamic Data Connection.
Author Your CE user ID is specified here by default. You may change this text to something else, if you choose.
Parent Folder This read-only item will appear if you ve already saved the Dynamic Data Connection, or you re modifying an existing Dynamic Data Connection. It simply shows the location in the Crystal Repository where the object is located.
Prompt Text Much like a Crystal Reports parameter field, a Dynamic Data Connection will prompt the report designer or viewer for their choice of Data Connection. Any text you type here will appear as prompting text to help the report viewer make the proper connection choice.
Rights Click the ellipses to set rights for this Dynamic Data Connection. Setting Business View rights is discussed in detail later in the chapter, under Setting Rights for Business View Objects.
Tip | Even if the Data Connections you add to a Dynamic Data Connection expose supposedly identical data schemas, you may encounter problems later in the Business View design process when browsing sample data or using the finished Business View in a report. This may be due to the datasources within the Dynamic Data Connection adding extra items, such as database catalog name, or database owner, to various portions of the resulting SQL statement. If you suspect this problem, edit the source Data Connections within the Dynamic Data Connection and set the Use Catalog or User Owner properties to False. |
Once you ve set any desired properties, you should save the object to the Crystal Repository. In fact, you must save the object to the repository before you set certain properties, such as rights, or perform additional functions, such as checking dependent integrity. To save the Dynamic Data Connection, click the Save button in the toolbar, press CTRL-S, or choose File Save from the pull-down menus.
The Save As dialog box will appear, consisting of an object name text box and an embedded copy of the Repository Explorer (discussed in more detail later in the chapter, under Using the Repository Explorer ). Choose the desired location for your Dynamic Data Connection by navigating to the desired folder, creating an additional folder, or selecting the root-level Crystal Management Server. If the name of the Dynamic Data Connection isn t appropriate, change it in the object name text box. Then, click Save to save the Dynamic Data Connection to the repository.
You may also want to ensure that any changes you ve made to existing Dynamic Data Connections don t adversely affect dependent objects, such as existing Data Foundations or Business Elements. More information on checking dependency can be found later in the chapter, under Object Integrity and References.
Consider that one of the requirements of the sample Business View discussed earlier in the chapter is the ability to choose between a test database and a production one when designing or viewing reports. Thus, a Dynamic Data Connection containing the XTREME production connection via SQL Server and the XTREME test connection via ODBC will provide this capability.
Once database connectivity has been organized with either Data Connections or Dynamic Data Connections, you ll need to begin the process of tying the data together and determining what data you ultimately want report designers and viewers to be able to see. This portion of Business View design is largely carried out within a Data Foundation.
A Data Foundation is a collection of one or more tables, stored procedures, views, SQL Commands, and so forth, which make up a single set of available data. Furthermore, additional data in the form of formulas and SQL Expressions can be added to a Data Foundation. And, parameter fields can be added to prompt the report designer or viewer for variable information. These parameters can be used within Data Foundation filters and formulas to customize Data Foundation behavior. Also, the Data Foundation is where row and column security can be specified to limit the set of fields or records that a report designer or viewer sees.
As you may gather from the large number of features that are controlled by a Data Foundation, creating it can often be the most complex portion of overall Business View design. You ll want to think carefully about what your ultimate goals for Business View design are before getting too deep into Data Foundation development. While you can always come back and edit a Data Foundation later, you ll save time and aggravation by planning ahead before initial design.
There are some fundamental Data Foundation rules you should keep in mind when planning Business View design:
Every table or data element must be linkable Even though you can add more than one Data Connection or Dynamic Data Connection to a Data Foundation, all tables you add to a single Data Foundation from any of these connections must be able to be linked to another table. Just as when designing a Crystal Report directly against multiple datasources, any mismatched data types or non-matching field contents will render tables unlinkable. The Data Foundation must ultimately be able to return a single record consisting of fields from all tables added to it. Therefore, all tables must be able to be properly linked.
Your ultimate Business View must be based on a single Data Foundation The all tables must be linked caveat at the Data Foundation level may cause you to attempt to link unlinkable data higher up in the Business View hierarchy. For example, you may have one Data Foundation that includes a base table with separate first and last name fields. You may create a formula to concatenate them into a single combined field, expecting to be able to link the formula to a combined first/last name field in another Data Foundation when you eventually create the top-level Business View object. However, when you attempt to create the Business View, you ll find that you are unable to combine data from multiple Data Foundations. This is a core limitation of the Business View product. So, while you can create multiple Data Foundations in the repository for various Business View requirements, you must ultimately use only one per top-level Business View object.
To create a new Data Foundation, choose the Data Foundation icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Data Foundation submenu item. The Choose a Data Connection dialog box will appear after a new Data Foundation is displayed in the Business View Manager, as illustrated in Figure 17-4.
The Choose a Data Connection dialog box will simply show the folder structure of the Crystal repository. Navigate through the folder structure of this dialog box to find your desired Data Connection or Dynamic Data Connection object (only Data Connections or Dynamic Data Connections will appear when you open repository folders). If your repository contains a large number of connections, you may use dialog box filters to narrow down the list of displayed connections. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The dialog box will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only connections that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of connections will reappear.
Once you ve selected your desired Data Connection or Dynamic Data Connection, click OK. You can also just double-click a desired Connection. If you choose a Dynamic Data Connection, you ll be prompted to pick which Data Connection from within it to use for the Data Foundation design process. The Insert Data Tables dialog box will now appear, as shown in Figure 17-5.
Click plus signs, as necessary, to expand the database connection to see available tables, views, and stored procedures. Choose one or more database items (you may CTRL-click or SHIFT-click to choose more than one item) and click the Add button to add them to the Data Foundation. You may also just double-click a desired item. As you add them, you ll see the items appear inside the Business View Manager (you may need to move the Insert Data Tables dialog box out of the way to see them).
If you wish to add an additional Data Connection or Dynamic Data Connection, click the Add Connection button. This will display the Choose a Data Connection dialog box, where you may navigate through the repository folder structure to look for additional connections. If you choose an additional Dynamic Data Connection, you ll be prompted to pick which connection to use. Once you choose the additional connection, the Insert Data Tables dialog box will appear with the new connection appearing as another category with a plus sign. Click the plus sign to choose database items from the new connection.
If, for some reason, the database connection you are using changes while the Insert Data Tables dialog box is being displayed, you may refresh the list of database items by pressing the F5 key, clicking the Refresh button above the list of tables, or right-clicking in the dialog box and choosing Refresh from the pop-up menu. Any changes to the database will be reflected in the dialog box.
You may also wish to customize display of the Insert Data Tables dialog box. By using options in the Database Explorer Options dialog box, you can choose to limit display to certain types of database items (just tables and views, for example, or all types of database items); only include tables that match a table name or owner character pattern; choose whether to list tables by name, description, or both; and sort table names alphabetically . Display this dialog box by clicking the Edit Options button above the list of tables, or right-clicking in the dialog box and choosing Options from the pop-up menu. After making choices in this dialog box, you ll need to click the Refresh button to redisplay the Insert Data Tables dialog box with the changes.
Once you ve chosen your tables and closed the Insert Data Tables dialog box, you ll see all chosen database items inside the Business View Manager. An automatically generated name for the Data Foundation will appear in the tab above the Data Connections, displayed with an asterisk (the asterisk indicates that this object has not been saved to the CE repository since being created or modified).
While you may still have many options to choose within the Data Foundation, you may want to save it to the Crystal Enterprise repository fairly quickly after choosing the first set of tables. To save the Data Foundation, click the Save button in the toolbar, press CTRL-S, or choose File Save from the pull-down menus.
The Save As dialog box will appear, which consists of an object name text box and an embedded copy of the Repository Explorer (discussed in more detail later in the chapter, under Using the Repository Explorer ). Choose the desired location for your Data Foundation by navigating to the desired folder, creating an additional folder, or selecting the root-level Crystal Management Server. If the name of the Data Foundation isn t appropriate, change it in the object name text box. Then, click Save to save the Data Foundation to the repository.
You may also want to ensure that any changes you ve made to the Data Foundation don t adversely affect dependent objects, such as existing Business Elements or Business Views. More information on checking dependency can be found later in the chapter, under Object Integrity and References.
While other Business View objects may be relatively simple to manipulate or modify, there is a lot more to the Data Foundation portion of Business Views than may initially meet the eye. Once you ve chosen an initial set of tables, there is still much to be done:
Additional tables may be required, or existing tables may need to be removed. You may also want to change the initial datasource that a table is based on, if you have multiple datasources with the same table. You may also need to set the alias name for a table, particularly if you have added two tables with the same name from different connections.
You ll need to link all your tables on one or more common fields. You may also need to change link and join types for various table links.
You may want to add customized data to your Data Foundation by way of formulas, custom functions, or SQL Expressions.
If you want to prompt report designers or viewers for variable information that can affect filters or formulas, you can create parameter fields. You may then use the parameter fields in other portions of the Data Foundation.
You can create filters that limit the Data Foundation to a certain set of records. Filters can either be hard-coded (such as setting the Country equal to USA) or based on parameters.
Row and column security can be set within a Data Foundation, limiting the set of fields or records that are available when reports are designed or run. This row and column security is based on filters and field rights, both being controlled via Crystal Enterprise user and group security.
While earlier discussions in this section revolved around choosing a single Data Connection or Dynamic Data Connection and picking tables, you may often need to add more tables from the first, or additional, connections. You may also need to remove tables that you added by mistake or no longer need.
If you need to add additional tables from an already- existing connection, or add more connections and add tables from them, redisplay the Insert Data Tables dialog box that appeared when you first created the Data Foundation. You may do this by clicking the Insert Data Tables toolbar button, by choosing Insert Insert Data Tables from the pull-down menus, or by right-clicking the Tables category of the Object Explorer window and choosing Insert Data Tables from the pop-up menu. The Insert Data Tables dialog box (shown previously in Figure 17-5) will appear.
For example, the sample Business View described throughout the chapter requires data from two XTREME sample databases (provided by a Dynamic Data Connection), and an Excel spreadsheet and comma-delimited text file (each provided by its own Data Connection). So, the Data Foundation used in this sample Business View will require Dynamic Data Connection and two Data Connections to all be added to the Data Foundation. Various tables from the XTREME Dynamic Data Connection, as well as a single table each from the Excel and text file connection, will be added to the Data Foundation.
Tip | The Referenced Data Connections window provides the same capabilities as the Insert Data Tables dialog box, but appears inside the Business View Manager alongside other windows. If you prefer to use this option, choose View Referenced Data Connections from the pull-down menus. |
If you inadvertently add tables in the Insert Data Tables dialog box that you don t want, you may remove them from the main Business View Manager window. There are, as you might expect, several ways to do this. You may simply click the table window title bar in the main Data Foundation window, right-click, and choose Remove Table from the pop-up menu.
You may also click a table name from within the Object Explorer window. Then, simply press the DEL key, choose Edit Delete from the pull-down menus, or click the Delete toolbar button.
Tip | You won t be able to remove a table if it is linked to any other tables. Delete any table links to or from the desired table before you attempt to remove it. |
If you initially add a table from a particular Data Connection or Dynamic Data Connection and then wish to replace it with an alternate table (most probably, with an identical structure to the first table), you can set the table s location to a different connection. To do this, select either an individual table within the Tables category of the Object Explorer, CTRL-click or SHIFT-click to select multiple tables, or click the word Tables above the entire set of tables that you wish to change (clicking the word Tables is, in essence, the same as SHIFT-clicking all tables within the Tables category). Then, right-click and choose Set Table Location from the pop-up menu, choose Edit Set Table Location from the pull-down menus, or click the Set Table Location toolbar button. You may also click the ellipses button next to the Data Connection property in the Property Browser (provided you have selected at least one individual table within the Tables category). The Set Table Location dialog box will appear.
This dialog box is identical to the Insert Data Tables dialog box (shown earlier in Figure 17-5), with the exception of having a different name in the title bar and displaying a Set button in place of the Add button. Click either an individual database item (such as a table or stored procedure), or click the connection name ”clicking anything else will dim the Set button. If you want to add a new connection to look for a database item, click the Add Connection button.
Choose the new table or connection you want to use and click Set (you can also just double- click the new table or connection). If you selected multiple tables in the Object Explorer before setting location, or chose a single table and then clicked a connection name, only the source connection will change for all the tables ”the Business View Manager will look for tables with identical names in the new connection. An error message will appear if matching tables aren t found. If you selected a single table before setting location, and then choose a different single table, Set Table Location will replace the first table with the one just chosen.
Once you set new table locations, you ll be asked if you wish to verify the database. If you reply Yes, the core database will be read in order to display any field name or data type changes in the Business View Manager. You may also wish to do this without changing a table location if the core database schema changes through normal maintenance. Do this by choosing Tools Verify Database from the pull-down menus, or clicking the Verify Database toolbar button. Any changes to the underlying data tables will be reflected in the Object Explorer and the Data Foundation linking diagram window.
If you verify the database and discover that even moderate changes have been made to the underlying data structure of the database, you should probably check the integrity of any dependent objects within the Business View. For example, if Business Element and Business View objects are dependent upon the field names and data types that have now changed, you may need to modify them to accommodate the core database changes. See Object Integrity and References later in the chapter for details.
Note | If field names have changed between the two tables, you ll be prompted to map new field names to existing fields. This is necessary to ensure that any field names that have changed can be connected to existing fields that may already be used in the Data Foundation. The Map Database Fields dialog box displayed in the Business View Manager is identical in appearance and behavior to that displayed in Crystal Reports. Look in Chapter 18 for more information. |
As a general rule, when you add a database item (table, stored procedure, view) to a Data Foundation, it is stored and displayed with the name it was given when the database was designed. There are two potential issues with using this pre-defined item name: (1) the name may not be intuitive or easy to understand, and (2) another table with the same name may be added from a different connection. The solution to either of these problems is to use an alias for the table.
An alias is simply a different name that refers to the original table in the connection. By assigning an alias, table names may be easier to understand or may differentiate multiple tables with the same core database name (such as a lookup table that needs to be added to the Data Foundation multiple times). The first opportunity to change a table s alias will be presented to you when you attempt to add a table to the Data Foundation with the same name as an existing table. The Rename Table dialog box will ask you to specify a new table name.
You may set the alias for an existing table (if the name is confusing, for example) by selecting it in the Object Explorer. Then select the Table Alias property in the Property Browser and type in a new table name.
Tip | Setting table aliases in the Data Foundation is largely beneficial only to the Business View designer. The actual table names that the report designer will see is determined when you create Business Elements (covered later in the chapter). |
Once you ve added tables from the various Data Connections to the Data Foundation, you must link all the tables together. As discussed at the beginning of the Data Foundations section, a core requirement of a Data Foundation is that all tables must be linked on at least one common field. By linking tables together, each table will follow the other as records are read, returning combined records with matching fields from all linked tables to the report designer or viewer.
Linking tasks are accomplished when viewing the Linking Diagram screen in the Business View Manager. If you don t see the Linking Diagram screen, click the Linking Diagram tab at the bottom of the center Business View Manager window (other tabs may appear for formulas, parameter fields, and so forth). Once the Linking Diagram screen is displayed, you may choose linking options either from the Linking Diagram pull-down menu, from various toolbar buttons , or by right-clicking in the Linking Diagram window and choosing options from the pop-up menus.
Note | Table linking concepts in Business Views are almost identical to linking concepts in Crystal Reports. Look in Chapter 16 under Linking Tables for table linking concepts, steps, and fine points. Only linking features not common to Crystal Reports will be covered in detail in this chapter. |
Use steps similar to those discussed in Chapter 16 to link tables. For example, you can simply drag and drop from the desired field in one table to the desired field in another to draw a link line. If your database design lends itself to automatic linking (either by field name or by key), you may choose the Smart Linking by Name or Smart Linking by Key choices to link automatically. To change options for an individual link, click the link line, right-click, and choose link-related options from the pop-up menu.
While most linking features are similar or identical to those in Crystal Reports, a few differences exist in Business Views:
Locate Table If you have added a moderate to large number of tables to your Data Foundation, it may be difficult to locate the table in the Linking Diagram window. The Locate Table option displays a dialog box listing all tables that you ve added. Choose this option by choosing Linking Diagram Locate Table in the pull-down menus, with the Locate Tables toolbar button, or by right-clicking in the Linking Diagram window and choosing Locate Table from the pop-up menu. Click a table name in the dialog box to highlight the table in the Linking Diagram window. Once you ve finished, click Done to close the Locate Table dialog box.
Fetch Table Indexes In Crystal Reports, tables in the Database Expert Links tab show colored arrows next to indexed fields. In Business Views, however, you must specifically request that indexes be read before index arrows appear in the Linking Diagram window. Choose Linking Diagram Fetch Table Indexes to perform this step. If the database driver you used to create the Data Connections supports exposed indexes, and your database has been indexed on several fields, you ll see colored arrows appearing next to indexed fields in the Linking Diagram window. If you d like to see a legend that indicates the significance of the colors of the arrows, choose Index Legend from the Linking Diagram pull-down menu or from the pop-up menu you ll see after right-clicking in the Linking Diagram window.
Select Visible Tables If you added many tables to your Data Foundation, it may be difficult for you to navigate all of them in the Linking Diagram window. If you would prefer that a limited set of tables be visible for certain linking choices, you can choose which tables appear or don t appear in the Business View Manager. Do this by choosing Linking Diagram Select Visible Tables from the pull-down menus or by clicking the Select Visible Tables toolbar button. The Choose Visible Tables for Linking Diagram dialog box will appear. Either select individual tables, click the Select All button to select all tables, or click the Clear button to deselect all tables. When you click OK, those tables that were selected will appear in the Linking Diagram window while those that weren t selected won t appear.
Change Linking View By default, the Business View Manager shows an individual window consisting of both the table name and all fields in the table, for each table within the Linking Diagram window. This is typically appropriate when you are initially linking tables, as you can see individual table fields for dragging and dropping links. However, you may prefer a more concise view that shows only table names without all fields. Display this alternate view by choosing Linking Diagram Change Linking View from the pull-down menus, by clicking the Change Linking View toolbar button, or by right-clicking in the Linking Diagram window and choosing Change Linking View from the pop-up menu. A more concise view showing just table names without fields and associated link lines will appear. To return to the original tables-with-fields view, simply choose the Change Linking View option again.
Tip | The Allow Table Joins Override property will appear in the Property Browser when you select the Data Foundation name in the Object Explorer. If you set this property to True, you will be able to change table linking from that selected in the Data Foundation when you create a Business View. If you leave this option set to False, the linking you choose in the Data Foundation will always be enforced in any Business Views based on this Data Foundation. |
Continuing with the XTREME Business View example discussed earlier in the chapter, the XTREME Dynamic Data Connection (based on the two XTREME Mountain Bike Data Connections), the Quotas Data Connection (based on the Excel spreadsheet), and the Regions Data Connection (based on the comma-delimited text file) should be added to the Data Foundation. Tables will be linked on common fields.
One of the main benefits of a meta layer tool such as Business Views is the ability to pre- create custom calculations and logic to provide to report designers. This ability allows you to create organization-specific calculations, custom fields, and other special data elements specific to your reporting requirements. These custom fields can be added to the Business View to appear alongside regular database fields. As far as the report designer is concerned , these custom fields are just another available field to drag and drop onto the report.
Two different types of custom fields can be created and placed in your Data Foundation: Formulas and SQL Expressions. Both can be used to create custom calculations, specially formatted fields, and complex logical expressions. The main difference is that formulas are ultimately evaluated and calculated by the report they re placed in, whereas SQL expressions make use of Structured Query Language functions from your database server and are processed and calculated by the server before being sent back to the report. Typically, there are many more available functions and operators you can use with formulas. However, because SQL expressions are evaluated on the database server, you ll often find improved database query performance when using SQL expressions in filters and other record selection situations. Also, because SQL Expressions are server-based, you can use them to link to other tables in the Business Views Manager.
Note | Creating formulas and SQL expressions in Business Views is almost identical to creating them in Crystal Reports. Detailed information on formula creation can be found in Chapter 5. Detailed information on SQL expressions can be found in Chapter 16 in Using SQL Expression Fields. Because of these similarities, only formula and SQL expressions differences between Crystal Reports and Business Views will be highlighted in this chapter. |
To create a new formula in your Data Foundation, right-click the Formulas category of the Object Explorer and choose Insert Formula from the pop-up menu. You can also choose Insert Insert Formula from the pull-down menus, or click the Insert Formula toolbar button. The Formula Editor will appear in the middle portion of the Business View Manager. Use the Formula Editor field, function, and operator boxes, as well as the formula text box, to create your formula.
To create a new SQL expression in your Data Foundation, right- click the SQL Expressions category of the Object Explorer and choose Insert SQL Expression from the pop-up menu. You can also choose Insert Insert SQL Expression from the pull- down menus, or click the Insert SQL Expression toolbar button. Because a SQL expression is processed by the database server, it is limited to including fields from a single database connection (unlike a formula, which can include fields that cross database boundaries). Accordingly, you ll be prompted to choose which Data Foundation connection to use for the SQL Expression. Once you make that choice, the SQL Expression Editor will appear in the middle portion of the Business View Manager. Use the SQL Expression Editor field, function, and operator boxes, as well as the formula text box, to create your SQL expression.
Caution | In order to create a SQL Expression, the Data Connection you choose must be based on a SQL Database or a connection via ODBC, as these connections make use of Structured Query Language. Other types of connections, such as native PC-style databases or proprietary data connections that don t use SQL, won t be available for use with a SQL Expression. |
With either a formula or a SQL expression, you can check for proper syntax by clicking the Check button in the Editor toolbar. You may click the Apply button to save the contents of the formula or SQL expression to the Data Foundation. To give the formula or SQL expression a meaningful name in the Data Foundation, select the Name text box in the Property Browser when the formula or SQL expression is selected in the Object Explorer. Then, type in an appropriate name and click outside the Name property to save the change. Make sure you save the Data Foundation itself with the Save toolbar button or File Save menu option to ensure that your new formula or SQL expression is actually saved to the repository with the remainder of the Data Foundation.
One exciting feature of the Business View Manager is the ability to link to other tables on a SQL expression. This improves the ability to link to other datasources that may not contain exactly the same type of data. For example, if one table contains separate first and last name fields, while the other contains a combined first/last field, you can create a SQL expression in the first table that concatenates the first and last name fields together. Then, by selecting True for the Show in Linking Diagram property that appears for the SQL Expression in the Property Browser, you can return to the Linking Diagram and link the SQL expression to another table. SQL expressions will appear with a small icon next to them inside the source table.
Caution | Creating SQL expressions when using Dynamic Data Connections may be problematic , as SQL expression syntax changes depending on the database and database driver used. For example, if you include a database from Microsoft Access via ODBC and one from SQL Server via OLE DB in a Dynamic Data Connection, the datasource you choose when first editing the Data Foundation will determine the syntax for SQL expressions. If you then attempt to use the SQL expression after choosing a different datasource, the expression may fail because of the different SQL syntax used by the alternate database. |
Custom functions are reusable pieces of formula language code that are available to every formula in your Data Foundation (they cannot be used in a SQL expression). Because they are stored in the Crystal Enterprise repository, they can also be centrally maintained . If a particular piece of business logic that a custom function exposes needs to be changed, a single change in the repository will propagate the change through all formulas created using the custom function.
Before you can use a custom function in a Data Foundation formula, you must first import the custom function into the Business View Manager from the repository. Do this by choosing Insert Import Custom Function from the pull-down menus, right-click the Custom Function category of the Object Explorer and choose Import Custom function from the pop-up menu, or click the Import Custom Function toolbar button. The Choose Custom Functions dialog box will appear.
Select the custom function you want to add and click the Add button. You may select as many custom functions as you d like and click Add (although, you can only click one at a time). When finished, close the Choose Custom Functions dialog box. You ll now notice that the custom functions you chose appear in the Custom Functions category of the Object Browser, as well as the Custom Functions category of the Function tree in the Formula Editor (you ll see the Formula Editor when creating or editing a formula). You may simply double-click the custom function name in the Formula Editor and supply necessary arguments to include the function in your Data Foundation formulas.
Note | Complete information on creating custom functions in Crystal Reports and adding them to repository can be found in Chapter 6. Also, if you would like to use sample custom functions that are included with Crystal Enterprise, choose Tools Install Repository Samples from the Business View Manager pull-down menus to install sample custom functions to the repository. |
Once you ve added a formula or SQL expression to the Data Foundation, you may later decide to edit it or delete it. To edit an existing formula or custom function, simply double-click it from within the appropriate category of the Object Explorer. You can also single-click the desired formula or SQL expression and choose Edit Edit Formula or Edit Edit SQL Expression from the pull- down menus. You can also right-click in the Object Browser and choose Edit from the pop-up menu. To rename a formula or SQL expression, select it in the Object Explorer and change the Name property in the Property Browser. You may also add a description for the object in the Property Browser, if you so desire .
To delete a formula, custom function, or SQL expression, select it in the Object Browser and press the DEL key. You may also right-click the desired object and choose Delete from the pop-up menu. Or, simply select the object and click the Delete toolbar button. If you attempt to delete a formula or SQL expression that is used in other formulas or SQL expressions, or if you attempt to delete a custom function that is used in a formula, you ll receive an error message. Remove the reference to the object from any other object before attempting to delete it.
As you add formulas and SQL Expressions to your Data Foundation, you ll notice that the Linking Diagram and editors used for each formula and SQL expression all take up the same window in the middle of the Business View Manager. Notice, also, that a tab appears at the bottom of this center window for each formula and SQL expression, as well as for the Linking Diagram. You may click a tab to display that particular object in the Business View Manager. If more tabs appear than can be shown at one time, click the arrow buttons to the left of the tabs. To remove a tab for a formula or SQL expression, click the small X to the left of the first tab or in the upper right-hand corner of the window ”double-clicking the formula or SQL expression from the Object Explorer will redisplay it. You cannot close the Linking Diagram window with the X button.
Note | You may notice the Rights property for individual formulas and SQL expressions in the Object Browser. Setting rights limits formula and SQL expression availability to certain report designers. More information on this capability is available later in the chapter, under Row and Column Security. However, you may notice that no Rights property is available for custom functions in the Property Browser. Rights for custom functions are set in the Repository Explorer instead. See Using the Repository Explorer later in the chapter. |
While Business Views allows a fair amount of flexibility in creating various Data Foundations that return different sets of data, you may want to provide the report designer and viewer various options that tailor Data Foundation behavior at run time. In particular, you may wish to prompt for a date range to limit records or prompt for a country to limit data returned by the Data Foundation. As with Crystal Reports, this variable behavior can be accomplished with parameters.
Caution | In the initial Business Views release, parameters can only be used with Data Foundation filters (discussed later in the chapter). Parameters cannot be used inside a formula or SQL expression created within the Data Foundation. |
A parameter is a prompt that appears every time a Business View based on the Data Foundation is used as a source for report data. The report designer or viewer provides a response to each parameter prompt, which modifies the way the Data Foundation returns data. When Crystal Reports are viewed or scheduled in Crystal Enterprise, parameter values can be supplied to customize the way the report runs.
To create a parameter, click the Parameters category of the Object Explorer, right-click, and choose Insert Parameter from the pop-up menu. You can also choose Insert Insert Parameter from the pull-down menus, or click the Insert Parameter toolbar button. The Create Parameter Field dialog box appears.
Give the parameter a name and choose a value type. Optionally, click the Set Default Values button to display the Set Default Values dialog box, where you can add values to form a pick list, set length limits for string parameters and range limits for numeric parameters, and so forth. When you are finished creating the parameter, click OK on the Create Parameter Field dialog box. The parameter will now appear within the Parameters category of the Object Explorer. You are now able to use the parameter in a Data Foundation filter (discussed later in the chapter).
Note | Creating parameters in Business Views is almost identical to creating them in Crystal Reports. Detailed information on parameter creation can be found in Chapter 14. Because of these similarities, only parameter differences between Crystal Reports and Business Views will be highlighted in this chapter. |
Once you ve added a parameter to the Data Foundation, you may later decide to edit or delete it. To edit an existing parameter, simply double-click it from within the appropriate category of the Object Explorer. You can also right-click in the Object Browser and choose Edit Parameter from the pop-up menu. The Edit Parameter Field dialog box (identical to the dialog you used when you created the parameter) will appear, where you may make changes to the parameter. To rename a parameter, select the parameter in the Object Explorer and change the Name property in the Property Browser.
To delete a parameter, select it in the Object Browser and press the DEL key. You may also right-click the parameter name and choose Delete from the pop-up menu. Or, simply select the object and click the Delete toolbar button. If you attempt to delete a parameter that is used in a filter, you ll receive an error message. Remove the parameter from all filters before attempting to delete it.
Tip | You can create parameters either when creating a Data Foundation, or when creating a Business Element (covered later in the chapter). The difference is that parameters you create in a Data Foundation will appear in all Business Elements that use the Data Foundation, whereas parameters created at the Business Element level will only appear in that one Business Element. |
It is a rare report that benefits from including every record in an entire database. In fact, inadvertently including every database record may result in excessive network traffic, shortage of temporary disk space on your computer, and, at the very least, a useless report of gigantic proportions . While Crystal Reports that are based on Business Views can make use of the Select Expert and the Crystal Reports record selection formula, limiting records to a meaningful set at the Business View level not only avoids runaway reports but allows only a limited set of data that s pertinent to the Business View to be returned to the report. In addition, the creation of Data Foundation filters is the cornerstone of Business Views row-level security that limits report data based on Crystal Enterprise user and group settings.
A filter (sometimes referred to as a Business Filter in Business Views documentation) is a limit placed on records that are returned from the database. Filters can take the form of only customers in the USA, only orders placed within the {?Order Date Range} parameter, and so forth. Filtering is a basic requirement of virtually all database query and reporting tools. You may create as many filters within a Data Foundation as you d like, applying one or more of them to individual Crystal Enterprise users or entire groups of users.
Note | While the filter process in Business Views is different from the Crystal Reports Select Expert, basic filtering and record selection concepts are the same. Get more detailed information on general record selection concepts by reading Chapter 8. |
To create a filter, click the Filters category of the Object Explorer, right-click, and choose Insert Filter from the pop-up menu. You can also choose Insert Insert Filter from the pull- down menus, or click the Insert Filter toolbar button. The filter window fills the middle of the Business View Manager, as shown in Figure 17-6.
Begin by choosing the field you want to use for the first (or only) part of your filter from the top portion of the filter window. Add it to the filter text box by either double-clicking it, dragging and dropping it to the filter text box, or selecting it and clicking the Add Selected Tree Item to Filter button from the filter toolbar (located in the middle of the filter window). The field will be added to the filter text box with an is any value criteria chosen by default.
Select the field in the filter text box. A drop-down list of available comparisons will appear below the filter text box. Click it to choose from the available comparison operators, such as equal to, less than, and so forth. Based on the comparison choice you make, additional drop- down/text box combinations will appear to the right of the comparison drop-down. Click the drop-down arrow to browse sample data for the field. If you wish to base this filter on a parameter, choose it from the drop-down list (only parameters that match the data type of the filter field will appear in the list). Or, you may just type in your desired comparison value (such as USA) in the list. Once you ve completed this first filter expression, you may either click the Check button to ensure that the filter meets proper syntax requirements, or click the Apply button to finalize choices you made for this expression.
If you only require a single filter expression, you are now finished creating the filter. Give your filter an appropriate name by typing it in the Name property text box in the Property Browser. However, if you need to create a compound filter that contains more than one expression connected with an AND or OR Boolean operator, click the desired AND or OR Boolean operator from the filter toolbar. The word AND or OR will appear after your first filter expression in the filter text box.
Then, repeat the steps described previously to add an additional field to the filter text box and choose a comparison choice and value for it. You may add additional AND or OR Boolean operators and additional field criteria as many times as necessary to create your desired compound filter. You may even reference another filter within this filter. As an existing filter ultimately results in a True or False value, you will simply add the existing filter to this filter connected with a Boolean AND or OR ”no comparison operation will be available for the existing filter. If you initially add an AND operator and wish it to, instead, be an OR (or vice versa), simply click the desired operator and click the Toggle And/Or Operator toolbar button.
If you wish to remove any portions of the filter in the text box (such as a particular field/comparison expression or Boolean operator), simply select it in the filter text box. Then, press the DEL key or click the Delete toolbar button from the filter toolbar.
As the default order of operations for Boolean operators is from left to right as they re encountered in the filter text box, you may wish to force the evaluation of one or more expressions before the rest of the filter by surrounding the expression or expressions with parentheses. As you cannot type any text directly into the filter text box, you must place the cursor in the text box where you wish to place a single left or right parenthesis, and then click the left or right parenthesis button in the filter toolbar. If you wish to place a left- right parentheses combination around multiple expressions, you may select the expressions, including the Boolean operators, by SHIFT-clicking each expression and Boolean operator that you wish to surround with parentheses. When all the desired expressions are highlighted, click the double-parentheses toolbar button.
Once you ve finalized your filter, click the Check button to ensure that it is syntactically correct ”any errors will be noted in a message. Click the Apply button to finalize the filter. Then, give the filter a meaningful name by typing it in the Name property in the Property Browser. If you wish to create additional filters within the Data Foundation, simply create a new filter using steps discussed previously. You may add as many different filters to the Data Foundation as you desire, assigning each to a Crystal Enterprise user or group of users via rights assignment (discussed later in the chapter, under Row and Column Security ).
If you create multiple filters and apply them all to a Data Foundation, Business Views applies a logical OR among the filters. While this is an understandable requirement to properly allow row security within a Business View, it will often give you results that are far different from multiple selection criteria added to the Crystal Reports Select Expert, which uses a logical AND between criteria. If you wish to apply a logical AND to multiple criteria, add multiple expressions to one filter and apply an AND operator between the expressions within the one filter.
As with any other Business View object, you ll most probably want to save the entire Data Foundation after you create filters. Click the Save toolbar button, or choose File Save from the pull-down menus to save the updated Data Foundation.
Tip | You can create filters either when creating a Data Foundation, or when creating a Business Element (covered later in the chapter). The difference is that filters you create in a Data Foundation will appear in all Business Elements that use the Data Foundation, whereas filters created at the Business Element level will only appear in that one Business Element. Also, in some cases, you may need to create filters at the different levels to achieve proper combinations of filters for correct row security. |
One of the most exciting new features of Crystal version 10 is row and column security provided by Business Views. While earlier versions of Seagate/Crystal Info (Crystal Enterprise s predecessor) supplied row and column security by way of Info Views, earlier versions of Crystal Enterprise have largely lacked this capability (with the exception of Crystal Enterprise Processing Extensions, which provided row security via tedious custom programming or purchase of third-party tools).
Row security allows filtering to be applied to database records on the fly to specific Crystal Enterprise users or groups. For example, when viewing a sales report, the Western Region Sales Manager can be limited to seeing only orders in the Northwest and Southwest. When viewing the same sales report, the National Sales Manager can view orders in all regions. The beauty of row security is that two different reports with two different sets of record selection aren t required to accomplish this. Row security applies the extra filters at run time to all reports based on the Business View supplying the row security. Row security is provided in Business Views by creating filters (described earlier in the chapter) and applying those filters selectively to certain Crystal Enterprise users and groups.
Column security allows data from certain fields within a datasource to be available only to specific Crystal Enterprise users or groups. For example, when viewing an employee roster report, the HR Manager will be able to see data in the Annual Salary and Monthly Salary fields, along with other employee fields. When any other user views the same employee roster report, the Annual Salary and Monthly Salary fields will display null values, while other employee fields will still display the proper contents. While column security doesn t prohibit a user from adding fields to reports at design time, no data will ever appear in those fields if the user isn t granted the field s right via column security. Column security is provided in Business Views by selecting individual fields in the Object Browser and limiting their rights.
Note | You can set row and column security with field limits and filters either when creating a Data Foundation, or when creating a Business Element (covered later in the chapter). The difference is that security you specify in a Data Foundation will apply to all Business Elements that use the Data Foundation, whereas security settings at the Business Element level will only appear in that one Business Element. |
Business Views row security is accomplished by defining Data Foundation filters, and then applying those filters to the desired Crystal Enterprise users or groups. First, define an appropriate filter to limit records as desired (as discussed earlier in the chapter, under Creating Filters ). For example, if you wish to limit records for the Western Region Sales Manager to only orders placed by Northwest and Southwest customers, create a filter that limits records where Region = ˜Northwest OR Region = ˜Southwest .
Once the filter has been defined, it must be applied to one or more Crystal Enterprise users or user groups. Otherwise, the filter will never have any effect on a Business View. To apply a filter to a CE user or group, you must first save the filter and save the Data Foundation. Then, set rights for the filter from within the Business View Manager. Begin by expanding the Filters category of the Object Browser. Notice that Full Data Access and No Data Access filters appear, even though you didn t create them. These filters, as their names imply, provide full access and no access to records from the Data Foundation. You may apply these built-in filters to users and groups to allow or deny broad access to Data Foundation records.
Note | Defining actual Crystal Enterprise user and user groups is accomplished in the Crystal Enterprise Crystal Management Console. More information on general Crystal Enterprise administration can be found in Part II of this book. |
To apply filters (either your own or Full Data Access/No Access) to CE users or groups, begin by selecting the filter that you wish to apply. Then, click the Edit Rights toolbar button, choose Edit Edit Rights from the pull-down menus, or right-click the selected filter and choose Edit Rights from the pop-up menu. You can also select the Rights property in the Property Browser and click the ellipses button. The Edit Rights dialog box will appear, as shown in Figure 17-7.
This dialog box will initially show two Crystal Enterprise groups added by default: the Everyone Group and Administrators group. Each group will be followed by a single check box indicating whether or not the filter is applied to that group (the filter won t be applied to Administrators or Everyone initially). If you want the filter applied to every Crystal Enterprise user, simply check the box next to Everyone to apply the filter to that group. If, however, you want the filter applied to a smaller set of Crystal Enterprise users, you must add additional groups or users to the list to apply the filter to. Do this by clicking the Add Groups or Add Users toolbar button. The Add Groups or Add User dialog box will appear.
Choose the user or group from the list that you wish to add to the Edit Rights dialog box. You may either double-click the user or group name, or choose the name and click the Add button. Add as many users or groups as you wish to apply the filter to. When you re finished, close the Add Groups or Add User dialog box to return to the Set Rights dialog box. Then, click the Apply check box to apply the filter to the new groups or users.
Note | More information on the Add Users and Add Groups dialog boxes can be found later in the chapter, under Using the Repository Explorer. |
Once you ve applied the filter to various groups, you may find it beneficial to preview the net rights (that is, rights that take into account group membership, higher-level CE folder rights, and so forth). While net rights aren t as significant when applying filters, as filters are simply applied or not at individual user or group levels, you still may find a filter being applied when you don t intend it because of other group membership. Click the Preview button in the Set Rights dialog box to display the net rights next to users and groups. Once you re satisfied that you ve applied the filter properly, close the Set Rights dialog box.
Business Views column security is set by choosing individual fields, formulas, or SQL expressions in the Object Browser and then setting rights for them. Rights can be set for individual Crystal Enterprise users or Crystal Enterprise user groups.
To apply column security to a desired field, formula, or SQL expression, expand the desired field category in the Object Browser and select the desired field within the category. Then, click the Edit Rights toolbar button, choose Edit Edit Rights from the pull-down menus, or right-click the selected field and choose Edit Rights from the pop-up menu. You can also select the Rights property in the Property Browser and click the ellipses button. The Edit Rights dialog box will appear, as shown in Figure 17-8.
As with the Set Rights dialog box used for applying filters, this dialog box will initially show two Crystal Enterprise groups added by default: the Everyone group and the Administrators group. Each group will be followed by a View Field Data check box indicating whether or not the field s data is available to that group (the right will indicate Inherited initially). Clicking the check box will cycle through three possible choices: Inherited, Granted, or Denied. If you specifically want to deny the field to everyone, click the check box next to Everyone until it indicates Denied (this is of limited usefulness, as this will automatically prevent everyone in CE from viewing field contents).
More likely, you ll want the field to be available to a certain set of CE users or groups and not available to everyone else. Therefore, you must add additional groups or users to the list to set rights for. Do this by clicking the Add Groups or Add Users toolbar button. The Add Groups or Add User dialog box will appear.
Choose the user or group from the list that you wish to add to the Edit Rights dialog box. You may either double-click the user or group name, or choose the name and click the Add button. Add as many users or groups as you wish to set rights for. When you re finished, close the Add Groups or Add User dialog box to return to the Edit Rights dialog box. Then click the View Field Data check box to cycle through the three choices for each new group or user.
While setting row security is a simple matter of applying or not applying a filter, setting column security is complicated by the concept of inheritance. Inheritance regards the ability of CE users and groups to inherit rights from higher-level groups, or settings made at the Crystal Management Server top folder level. For example, the rules of inheritance might cause a problem when applying column security to the HR Manager user.
If you have previously explicitly denied rights to the field for the Everyone group, you would be unable to grant rights to the field for the HR Manager even if you explicitly granted the right for the HR Manager user. This is because the HR Manager is automatically a member of the Everyone group and explicit denial takes precedence, via inheritance, over explicit granting. The solution is to not explicitly grant or deny the right to the Everyone group, but to explicitly grant it to the HR Manager user. By not explicitly granting the right to the Everyone group, everyone still won t be able to see the field s contents, as not explicitly granting a right automatically denies it. However, because the Everyone group is not explicitly denied the right, the HR Manager will be able to see the field s contents if explicitly granted it, as the rules of inheritance don t consider an unspecified right at a higher group level to be explicitly denied.
The Preview button, which shows net rights for a user or group, is more helpful when setting column security than when setting row security. By clicking this button, you ll see the net rights assigned to users or groups after taking inheritance into account. Take the previous example of explicitly denying a field s right to the Everyone group, but then explicitly granting it to the HR Manager. Notice that the Preview button shows that the HR Manager still won t have rights to the field because of inheritance.
However, if you leave the Everyone group unspecified and grant the right to the HR Manager, you ll notice that everyone still can t see the field s contents, but the HR Manager can. This results from the rules of inheritance.
If you think the concepts of inheritance can be a bit confusing, you may be right. While inheritance is designed to make administration of user and group rights simpler, it can also cause confusion. Get more information on the rules of inheritance later in the chapter, under Using the Repository Explorer.
Once you re satisfied that you ve applied proper rights to the field, close the Set Rights dialog box. You may receive a warning indicating that you should check other fields that may be related to the field you just set rights for. For example, even if you limit the Salary database field to the HR Manager, sensitive information still may be available to other report viewers if you have used the Salary field elsewhere in a formula or SQL expression. Ensure that all fields, formulas, and SQL expressions that require column security are specifically addressed using the Edit Rights dialog box.
Tip | It goes without saying that testing your row and column security model is of utmost importance. Often, because of the idiosyncrasies of the Business View Manager (the OR logical connection between multiple Data Foundation filters and rules of inheritance are examples), you may not initially achieve the row or column security you anticipate after your first attempt. For example, you may need to create different filters at both the Data Foundation and Business Element levels to achieve proper combinations for correct row security. You should use Crystal Reports or Crystal Enterprise to test your row and column security model to ensure that data limits do apply to users that should have limits, and that users who shouldn t be limited, in fact, are not. |
Continuing toward the sample XTREME Business View discussed earlier in the chapter, two filters will need to be created. The first will limit customer countries to the USA and will be applied to all users. While the second filter to limit customer regions to the Northwest or the Southwest used to apply row security to the Western Region Sales Manager may be done here, it will probably need to be done at the Business Element level, due to the Boolean OR value applied between multiple Data Foundation filters. Furthermore, column security will be set so that only the HR Manager has rights to the Salary field from the Employee table, as well as the Monthly Salary formula (which divides the Salary field by 12).
As you discovered if you read through much of the previous section on creating Data Foundations, a great deal of the data abstraction, calculation, and security application is done at the Data Foundation level. However, you may have noticed that unwieldy field names couldn t be changed. You may also have noticed that you had no way of limiting the Data Foundation s set of exposed fields ”if you added a table, all fields were available in the Data Foundation (even if you apply column security, a field will still appear inside Crystal Reports even if no data will appear for the field). And, you probably noticed that fields were still organized within their core database tables ”you couldn t group fields from different tables together in a more logical fashion.
The Business Element object within your overall Business View allows you to organize your data to your liking. A Business Element is simply a smaller set of fields from an underlying Data Foundation. Business Elements determine what set of virtual tables ultimately appear in Crystal Reports when a report designer makes use of your Business View. So, even if your underlying Data Foundation consists of 15 different physical database tables that expose 150 fields, you can set up three Business Elements to show 35 significant fields from the Data Foundation in three more logical organizations. Business Elements provide the ability to include any field in any Business Element regardless of what original table it came from, as well as giving the field a more appealing name. When you have created your various Business Elements, you simply add one or more of them to Business View objects (discussed later in the chapter) to determine which set of tables will appear in Crystal Reports.
There are several core concepts to keep in mind when creating Business Elements:
A Business Element must be based on a Data Foundation. If you have yet to create any Data Foundations in the CE repository, you will be unable to create any Business Elements.
A Business Element can only be based on a single Data Foundation. If you wish to include fields from more than one Data Foundation in a single Business Element, you will find that you are unable to do so. You will need to modify one of the Data Foundations to add additional fields that you wish to use in the Business Element.
There are two different ways of creating Business Elements: by creating them manually within the Business View Manager s typical user interface or by using the Business Element Wizard to create them via a step-by-step process. As is often the case, you gain more control over individual portions of the Business Element by using the Business View Manager manual method, but you can create multiple Business Elements more quickly using the wizard. You may want to try a combination of methods, perhaps creating a core set of Business Elements quickly with the wizard, and then making any granular modifications to them manually with the Business View Manager itself.
To create a new Business Element, choose the Business Element icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Business Element submenu item. The Choose a Data Foundation dialog box will appear after a new Business Element is displayed in the Business View Manager, as illustrated in Figure 17-9.
The Choose a Data Foundation dialog box will simply show the folder structure of the Crystal repository. Navigate through the folder structure of this dialog box to find your desired Data Foundation object (only Data Foundations will appear when you open repository folders). If your repository contains a large number of foundations, you may use dialog box filters to narrow down the list of displayed connections. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The dialog box will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only foundations that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of foundations will reappear.
Once you ve selected your desired Data Foundation, click OK. You can also just double- click a desired foundation. The Insert Business Fields dialog box will now appear.
Click plus signs, as necessary, to expand the available tables, formulas, and SQL expression categories. Choose one or more fields (known as Business Fields in Business Views documentation) that you wish to add to this Business Element. You may CTRL-click or SHIFT-click to choose more than one field. Click the Add button to add them to the Business Element. You may also just double-click a desired field to add it. As you add them, you ll see the items appear inside the Business View Manager (you may need to move the Insert Business Fields dialog box out of the way to see them). If you add a field that duplicates a field name already added to the Business Element, you ll be given the opportunity to change its name (also known as an alias) as to not conflict with another field. Once you ve added all your desired fields, close the Insert Business Fields dialog box.
Tip | The order in which you insert fields from the Insert Business Fields dialog box will be the same order fields appear in when you use the Business Element in a Business View, and eventually in Crystal Reports. This may be deceptive, as fields in the Business View Manager appear in sorted order regardless of the order you inserted them. As you can t reposition fields in a different order, ensure you place them into the Business Element in the correct order if you have a preference. In Crystal Reports, you have the choice of viewing Field Explorer fields in the order they appear in the Business View, or in alphabetical order. |
Once you ve added fields, the middle of the Business View Manager will show the Fields List. This simply shows a list of fields you ve added to your Business Element, including the field name, data type, field length, source field from the Data Foundation, and any description provided by the Data Foundation or underlying database. You may change the sort order of the Fields List by clicking a column heading. Both ascending and descending sort orders are available for the columns .
Notice that an additional Field Structure tab appears next to the Fields List tab at the bottom of the window. Clicking this will display a different view of Business Element fields known as the Field Structure. Initially this is simply the same set of fields as seen in the Fields List view. However, if you drag one field and drop it onto another, the field you dragged will be placed below the field you dropped onto and indented to create a hierarchy.
This capability is of little use when creating Business Elements for use with Crystal Reports, but it may be useful when creating Business Elements for multidimensional or OLAP types of data cubes (the initial release of Business Views does not create these types of data structures). To reset the field structure so that no field hierarchies exist, choose Edit Reset Field Structure from the pull-down menus, right-click the Business Element name in the Object Browser and choose Reset Field Structure from the pop-up menu, or click the Reset Field Structure toolbar button. Fields will reappear in the original order of the Business Element with no hierarchy shown.
One of the first Business Element capabilities you ll probably want to take advantage of is the ability to rename fields, or set a field s alias. By renaming a field, you can make the ultimate Business View more meaningful and intuitive by eliminating confusing field names from the original datasource. Expand the Object Explorer s Fields category and select the field you want to rename. Then, simply click the Name property in the Property Browser and type in a new field name. When you click outside of the Name property, the new name you typed will appear throughout the Business View Manager. If you are curious what the original source field name is for the newly aliased field, view the Fields List in the middle of the Business View Manager. The Source Data Field column will indicate the original field name for the aliased field.
As with any other Business View object, you ll most probably want to save the entire Business Element as you progress. Click the Save toolbar button, or choose File Save from the pull-down menus to save the updated Data Foundation. If you have not saved the Business Element previously, you ll be asked to confirm a name and folder location in the Crystal repository.
Once an initial set of fields has been added to your Business Element, it s a foregone conclusion that you ll want to delete some existing fields or add new fields from the Data Foundation. To delete a field, just select it in the Object Browser (you can t delete fields from the Fields List or Fields Structure windows). Then, press the DEL key, right-click the field and choose Delete from the pop-up menu, or click the Delete toolbar button.
Inserting a new field from the Data Foundation is equally simple. Choose Insert Insert Business Fields from the pull-down menus, right-click the Fields category of the Object Browser and choose Insert Business Fields from the pop-up menu, or click the Insert Business Fields toolbar button. The Insert Business Fields dialog box will reappear. Choose additional fields to add to your Business Element.
Another way of adding fields, as well as filters, from the underlying Data Foundation is by displaying the Referenced Data Foundation window. Choose View Referenced Data Foundation from the pull-down menus. The window will appear as another explorer-like window attached to the right side of the Business View Manager.
Expand the various categories of the Data Foundation to see available fields. Add a field to the Business Element by dragging and dropping it from the Referenced Data Foundation window to the Object Explorer, the Fields List, or the Fields Structure (you can drop filters only onto the Object Explorer, and parameters cannot be dropped at all). When you re finished, you may close the Referenced Data Foundation window by clicking the small X in the upper right-hand corner.
As with an underlying Data Foundation, you can create Parameters and Filters in the Business Element. Steps to create these items are identical to steps for creating them in Data Foundations. Look earlier in the chapter in the Data Foundations section under Creating Parameters and Creating Filters for exact steps.
The difference between creating parameters and filters at the Business Element level and the Data Foundation level is that these items will apply to all Business Elements based on a Data Foundation if they re created at the Data Foundation level. However, if they re created at the Business Element level, they will only apply to this one Business Element.
As mentioned at the beginning of this section, there are actually two ways of creating a Business Element. The second way is the Business Element Wizard, which provides a step-by- step approach to creating one or more Business Elements.
To create a new Business Element with the Business Element Wizard, choose the Business Element Wizard icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Business Element submenu item. The Business Element Wizard will appear, with the Choose Data Foundation screen appearing first.
The Choose Data Foundation screen will simply show the folder structure of the Crystal repository. Navigate through the folder structure of this dialog box to find your desired Data Foundation object (only Data Foundations will appear when you open repository folders). If your repository contains a large number of foundations, you may use dialog box filters to narrow down the list of displayed connections. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The wizard will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only foundations that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of foundations will reappear.
Once you ve selected your desired Data Foundation, click Next. The Create Business Elements screen will appear within the wizard, as shown in Figure 17-10.
Click plus signs, as necessary, to expand the available tables, formulas, and SQL expression categories in the left From Data Foundation list. Select the items you d like to add to the right Business Elements list. You can choose an individual field, formula, or SQL expression. You can also choose entire tables. You can even choose all tables by just clicking the Tables category. You may CTRL-click or SHIFT-click to choose more than one object.
Click the right arrow to add the selected objects to the Business Elements list. You may also just double-click a desired field to add it. The type of object you selected in the From Data Foundation list determines the type of object that appears in the Business Elements list. If you choose an entire table, the table will become a separate Business Element in the Business Elements list, with all its fields appearing underneath. If you choose one or more fields, they will simply be copied to the Business Elements list within the currently selected Business Element. If you click the Tables category and click the right arrow, or click the double-right arrow, all tables will be copied as individual Business Elements with their fields appearing underneath.
Tip | The order in which you see fields in the Business Elements list will be the same order fields appear in when you use the Business Element in a Business View, and eventually in Crystal Reports. As you can t reposition fields in a different order in the Business Elements list, ensure you place them into this list in the correct order if you have a preference. In Crystal Reports, you have the choice of viewing Field Explorer fields in the order they appear in the Business View, or in alphabetical order. |
Once you ve created Business Elements and fields in the Business Elements list, you may use the left arrows or the Delete button above the Business Elements list to remove either entire Business Elements or individual fields. Just select the Business Elements or fields (you can SHIFT-click and CTRL-click in this list, too) that you wish to delete and click the left arrow or Delete button to remove them.
If you prefer to manually create an entire Business Element, just click the New Business Element toolbar button above the Business Elements list. A new Business Element with an automatically generated name will be added to the Business Elements list. Select it and then add individual fields from the From Data Foundation list.
To rename either entire Business Elements or individual fields, select the desired Business Element or field in the Business Elements list. Then, click the Rename button. The Business Element or field name will be placed into edit mode. Simply type in a new name and click outside the object. The selected object will take on the new name (you ll be given an error if you attempt to assign a name that already exists).
Once you ve designed your Business Elements and added and renamed all pertinent fields, click Next. The wizard will display the Save to Repository screen, showing the folder structure of the Crystal repository (this screen is similar to the Repository Explorer, discussed later in the chapter). Navigate through the folder structure to see any existing Business Elements already in the repository (only Business Elements will appear when you open repository folders). If your repository contains a large number of elements, you may use dialog box filters to narrow down the list of displayed elements. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The wizard will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only elements that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of elements will reappear.
If you want to create a new repository folder to place the Business Elements in, click the New Folder button above the repository list. Or, select an existing folder to place all your new Business Elements in (you cannot save multiple Business Elements in different folders here). Click Finish to save the Business Elements, or Next to be given a choice of options after the elements have been saved.
If you click Next, the wizard will display the What to Do Next screen, giving you four choices. Select the desired choice and click Finish.
Create a Business View Saves the Business Elements and immediately creates a new Business View containing the newly created Business Elements.
Create More Business Elements Saves the Business Elements and returns to the Choose Data Foundation screen at the start of the wizard to repeat the Business Element creation process.
Edit the Created Business Elements Saves the Business Elements and returns you to the Business View Manager where all the just-created Business Elements will be open for manual editing.
Exit Saves the Business Elements and returns you to the Business View Manager in the same state it was when you initially started the wizard.
Caution | It s advisable to examine existing Business Elements in the repository before you save a large number of Business Elements from the wizard, in case any existing elements have the same name as elements the wizard will try to save. The wizard will save elements until it encounters a duplicate name. It will then present an error message. However, if you click the Back button and delete or rename the offending element, you may receive additional errors if you try to save again. This is because the first set of elements that didn t have duplicate names may have been saved the first time. |
As with Data Foundations, you can set row and column security settings at the Business Element level. Steps are the same as they are for Data Foundations: creating filters and applying them to Crystal Enterprise users or user groups, and selecting individual fields and setting rights for them by user or group.
The difference between setting row and column security at the Business Element level and the Data Foundation level is that Data Foundation row and column security affects all Business Elements based on the foundation, whereas security set at the Business Element level affects only that particular Business Element. One important issue to remember is that you can t turn off existing row and column security supplied by the Data Foundation in the Business Element. For example, even if you apply a Full Data Access filter to the Everyone group within the Business Element (you ll need to copy the Full Data Access filter to the Business Element from the Referenced Data Foundation window), any more restrictive filters applied at the Data Foundation level will still apply to the Business Element. Also, setting a View right for a field in a Business Element will not give access to that field if it has been restricted at the Data Foundation level. However, you can create additional row and column security at the Business Element level that is not provided at the Data Foundation level.
Steps to creating row and column security by way of filters and field rights is the same with Business Elements as it is with Data Foundations. Look in the Data Foundations section under Row and Column Security for information on the process.
Continuing the discussion of the XTREME sample Business View discussed throughout the chapter, several Business Elements are created containing a limited set of relevant data from the XTREME Data Foundation. In particular, XTREME Customer Info, XTREME Order Info, and XTREME Sales Rep Info Business Elements are created. Relevant fields and formulas are added to these Business Elements, being renamed as appropriate. Existing row and column security from the Data Foundation will be used, propagating the USA filter and salary column security to the Business Element. However, because of the way Business Views applies multiple filters at the Data Foundation level, the row security setting limiting the Western Region Sales Manager to Northwest and Southwest may need to be moved from the Data Foundation to this Business Element.
The ultimate goal of the entire Business View design process is the actual Business View object itself. This is the only object that will appear when you connect to the repository with Crystal Reports. This object is what exposes the set of virtual tables to the report designer, including all row and column security, renamed fields, and so forth. Because you add existing Business Elements to a Business View, you ll need to make sure you ve created one or more Business Elements before attempting to create the Business View.
To create a new Business View, choose the Business View icon from the welcome screen when starting the Business View Manager or clicking the New toolbar button, or choose File New from the pull-down menus, choosing the Business View submenu item. The Insert Business Elements dialog box will appear after a new Business View is displayed in the Business View Manager, as illustrated in Figure 17-11.
The Insert Business Elements dialog box will simply show the folder structure of the Crystal repository. Navigate through the folder structure of this dialog box to find your desired Business Element objects (only Business Elements will appear when you open repository folders). If your repository contains a large number of elements, you may use dialog box filters to narrow down the list of displayed connections. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The dialog box will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only elements that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of elements will reappear.
Select Business Elements that you want to appear as tables within your Business View. You may just double-click a Business Element to add it to the Business View, or select the element and click the Add button. Business Elements will be added to the Business View window in the Business View Manager (you may need to move the Insert Business Elements dialog box to see them). Once you ve finished adding desired Business Elements, close the Insert Business Elements dialog box.
There are very few properties in the Property Browser that you can change when editing a Business View. If you click the Business View name at the top of the Object Explorer, the following properties will appear in the Property Browser:
Name Type the descriptive name you wish this Business View to have when you save it to the Crystal repository.
Description Type an optional description to more fully explain the usage of this Business View.
Author Your CE user ID is specified here by default. You may change this text to something else, if you choose.
Business Element Filter Combination This property allows two choices: AND and OR. Since individual Business Elements that make up the Business View can have their own filters, you may choose how to apply the filters together to get a final set of returned records. If you choose AND, a Boolean AND operator will be used when applying all the filters in the included Business Elements ”a record will have to meet all the filter requirements to be returned. If you choose OR, a Boolean OR operator will be used and a record will only have to meet any one of the filter requirements to be returned.
Rights Click the ellipses to set rights for this Business View. Setting Business View rights is discussed in detail later in the chapter, under Setting Rights for Business View Objects.
By default, the list of Business Elements you added to the Business View appears in the middle window of the Business View Manager. If you find that more detail on certain Business Elements might be handy to view, you may view individual field detail for a selected Business Element in the middle window as well. Just double-click the desired Business Element in the Object Explorer, or right-click the desired Business Element and choose Show Business Element Detail from the pop-up menu. An additional tab will be added to the middle Business View Manager window showing fields within the chosen Business Element. You can navigate among multiple tabs, including closing Business Element detail tabs, with the arrow buttons and X button at the bottom of the middle window.
As with any other Business View object, you ll most probably want to save the entire Business View object as you progress. Click the Save toolbar button, or choose File Save from the pull-down menus to save the updated Data Foundation. If you have not saved the Business View previously, you ll be asked to confirm a name and folder location in the Crystal repository.
Once an initial set of Business Elements has been added to your Business View, you may later decide to delete some existing Business Elements, or add new Business Elements from the repository. To delete an element, just select it in the Object Browser (you can t delete elements from the middle Business View window). Then, press the DEL key, right-click the element and choose Delete from the pop-up menu, or click the Delete toolbar button.
Inserting a new Business Element from the repository is equally simple. Choose Insert Insert Business Elements from the pull-down menus, right-click the Business Elements category of the Object Browser and choose Insert Business Elements from the pop-up menu, or click the Insert Business Elements toolbar button. The Insert Business Elements dialog box will reappear. Choose additional elements to add to your Business View. You may also expand folders in the Repository Explorer and simply drag a Business Element from the repository to the middle Business Elements list. The element will be added to the Business View.
Caution | A core requirement of Business Views is that all Business Elements added to a single Business View must be based on the same Data Foundation. If you attempt to add elements from different foundations, an error message will result. If you find that you need to add Business Elements to a single Business View that aren t based on the same Data Foundation, you ll need to edit the Data Foundation and Business Elements to add the additional data items. If this is not possible (due to unlinkable data, for example), you may want to consider creating Crystal Reports subreports based on the different Business Views. |
If you look closely at the Business View Manager menus while editing a Business View object, you may notice the Linking Diagram pull-down menu, as well as a few toolbar buttons that relate to table linking. However, you may also notice that the toolbar button and all options on the pull-down menu are dimmed.
If the Business View designer so desires, a Business View object can be set to override any table linking that is set in the underlying Data Foundation. This may be handy, for example, if you wish to create two separate Business Views based on the same Business Elements but change table linking within each Business View to return a different set of records.
The first requirement to override Data Foundation Linking is to set the Allow Table Joins Override property to True in the Data Foundation itself. If necessary, edit the Data Foundation that the Business Elements are based on and change this property in the Property Browser. Then, save the updated Data Foundation to the repository.
When you reedit the Business View, you ll now notice that the Linking Diagram Override Linking pull-down menu option is enabled. If you choose it, a Link Override window and tab will appear in the middle of the Business View Manager. When you display the Link Override window, you ll see the underlying tables that make up the Data Foundation the Business View is based on. All the remaining options on the Linking Diagram pull-down menu, as well as link-related toolbar button, will now be enabled.
Use techniques described under Linking Tables in the Data Foundation section of this chapter, as well as in Chapter 16 of this book, to change table linking for this Business View object. If you later decide you wish to return to table linking stored in the Data Foundation, simply choose Linking Diagram Revert Linking from the pull-down menus. After a confirmation message, linking will revert to that stored in the underlying Data Foundation.
Since so many different forms of security (including row and column security) can apply to the Business View object, the Rights Test View dialog box can be used to check a variety of rights for chosen Crystal Enterprise user IDs. The Rights Test View can show if the current Business View object is even able to be used by the user, and if so, what row and column security will be applied.
Display the Rights Test View dialog box by choosing Tools Rights Test View from the pull-down menus, by right-clicking the Business View name in the Object Explorer and choosing Rights Test View from the pop-up menu, or by clicking the Rights Test View toolbar button. The Rights Test View dialog box will appear, as shown in Figure 17-12.
Select a Crystal Enterprise User ID to test for rights. You may click the User Name drop- down list at the top of the dialog box and choose any user ID that has been used recently for a rights test. If the desired ID isn t in the list, click the Select User button. The Add User dialog box will appear showing all user IDs in Crystal Enterprise. Use the dialog box to choose the desired user and then close the dialog box. The user ID will then appear in the User Name list.
The first indication will be whether or not the chosen user can even use the Business View. If not, the Business View Visible text will indicate False and nothing else will appear in the dialog box. If the Business View is visible for the user, a list of Business Elements will appear in the box, each displaying a plus sign. Click the plus sign to see individual fields within the Business Element.
If any column security is applied for this chosen user, you ll see red X indicators displayed next to field names that are unavailable to this user ID. Furthermore, row security will be indicated by the Final Filter Text displayed at the bottom of the dialog box. Because row security can be affected by different Business Elements and fields, you may redisplay any row security filters for a limited set of fields or Business Elements by unchecking the check boxes next to certain fields or Business Elements and clicking the Apply button. The updated row security filter (if any) based on just the checked fields and elements will appear in the Final Filter Text area.
When finished, simply close the Rights Test View dialog box. Wrapping up the XTREME sample Business View, then, simply consists of adding the three previously created XTREME Business Elements into the single Business View object and saving it to the repository. The XTREME Business View is now ready to be used with Crystal Reports.
Because of the hierarchical nature of Business Views (as discussed earlier in the chapter, Business View objects are dependent on Business Elements, Business Elements are based on Data Foundations, and so forth), there is a very real possibility that changes you make to one object will affect another object (perhaps catastrophically). For example, if you base a series of Business Elements and Business Views on a certain set of tables and fields in a Data Foundation, and then remove them from the Data Foundation, the dependent Business Elements and Business Views will cease to work properly.
There are three different options available throughout the Business View Manager to check for these possibilities: Show Dependent Objects, Show Referenced Objects, and Check Dependent Integrity. Show Dependent Objects and Show Referenced Objects are always available, while Check Dependent Integrity is available for every object type except a Business View. The choices are available from the Tools pull-down menu, as well as via toolbar buttons.
Tip | You can also make use of these options from within the Repository Explorer. Select the desired object within the repository and click the appropriate toolbar button. More information on the Repository Explorer appears later in this chapter. |
Dependent objects are those that depend on the current object you have selected or are editing. For example, if you are editing a Data Connection, virtually every object above the connection in the Business View hierarchy (Dynamic Data Connections, Data Foundations, Business Elements, and Business Views) relies on it. Conversely, referenced objects are objects that the object you have selected or are editing references in one form or another. For example, if you have selected a Business View in the Repository Explorer, at least one Business Element, Data Foundation, and Data Connection (perhaps more) will be referenced by it.
To show dependent objects for a selected object, choose the Show Dependent Objects menu option or toolbar button. The Dependent Objects dialog box will appear, showing the hierarchy of dependent objects. Click plus signs to see the different objects within the repository that depend on the object you originally selected.
To show referenced objects for a selected object, choose the Show Referenced Objects menu option under the Tools menu or toolbar button. The Referenced Objects dialog box will appear, showing the hierarchy of referenced objects. Click plus signs to see the different objects within the repository that are referenced by the object you originally selected.
While the steps just described will show you a list of dependent or referenced objects, they don t necessarily indicate that all objects that depend on, or are referenced by, each other are actually whole. The situation described previously where Business Elements and Business Views may reference fields or tables that have been removed from an underlying Data Foundation is an example that won t be exposed by just showing references or dependencies. To avoid this situation, you need to check to see that all the tables, fields, and other internal elements that are passed back and forth among different Business Views objects are contained in all objects.
To check dependent integrity for a selected object, choose the Check Dependent Integrity menu option or toolbar button. The various dependent objects will be checked to ensure that all referenced fields and tables are accounted for. If no problems are found, a message will so indicate. If, however, tables or fields are missing that are expected in other objects, a dialog box indicating the problem will appear.
Caution | In the initial release of the Business View Manager, the Check Dependent Integrity feature will not detect a mismatch between a Data Connection and other objects further up the Business View hierarchy. If you encounter data errors in other Business View objects, ensure that the Data Connection that the objects are based on is properly returning the required tables and fields. |
Once you have gone about the steps of creating the individual objects that make up your Business Views, you may wish to export them for use in another CE system (perhaps you have test and production systems), or export them to keep as an extra backup. The Business View Manager allows entire Business View object hierarchies to be exported to XML format and re-imported later.
To export an existing Business View, choose Tools Export from the pull-down menus. The Export dialog box will appear. The Select Business Views to Export box on the left side of the dialog shows the repository folder structure. Navigate through the folder structure of this dialog box to find your desired Business View objects (only Business Views will appear when you open repository folders). If your repository contains a large number of Business Views, you may use dialog box filters to narrow down the list of displayed Business Views. Right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The dialog box will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only Business Views that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply right-click and click the Advanced Filtering option again. The complete list of Business Views will reappear.
As you can export more than one Business View, select as many as you wish to export, clicking the right arrow after each. You may also CTRL-click to select multiple Business Views and click the right arrow to add them all. If you determine that you ve added Business Views that you don t want to export, select the desired Business View in the Selected Business View list and click the left arrow.
Type an XML path and filename to store the exported Business Views in the XML Filename box at the top of the dialog. If you prefer to navigate to a particular folder, click the Choose XML button. Check the Export Security Information check box at the lower left of the dialog to export any row and column security settings and object rights along with the Business View objects (for safety, any embedded Data Connection passwords are not exported). And, checking the Preserve Folder Structure check box will export folder information from the repository along with Business View Objects.
Click OK when you are ready to export the selected Business Views. A message will appear once the export is complete. Examining the exported XML file illustrates the way Business View objects are stored in the repository.
Importing Business Views back into the Crystal repository is similarly straightforward. Choose Tools Import from the pull-down menus. The Import dialog box will appear, showing the repository folder structure in the middle. Note that even though plus signs exist, you will only see subfolders if you click them ”no actual existing Business View objects will appear. Click the folder you want to import the Business Views into, or click the New Folder button to create a new folder.
Type the source XML path and filename containing the Business Views you want to import in the XML Filename text box. If you d prefer to navigate to the file, click the Choose XML button. Check the Preserve CUID When Importing Objects check box at the bottom of the dialog box to use the same Crystal Enterprise unique identifier numbers used when the Business Views were exported. This is important if you are planning on using existing Crystal Reports with the imported Business Views, as the Business View unique identifiers are stored with the reports. The Overwrite If CUID Exists option will overwrite any existing Business View objects with the same unique ID. And, checking the Merge Folder Security option will combine folder security settings between the folders that the original Business Views were in and the destination folder you choose to import the objects (if there is a conflict between settings, the settings already existing in the destination folder in the repository will take precedence).
Finally, if you need to import the Business Views into a different Crystal Enterprise system than you logged on to when you first started the Business View Manager, click the Choose Repository button. A new Crystal Enterprise logon dialog will appear, where you can choose a different Crystal Management Server, user ID, password, and authentication type. Once you ve specified all necessary information, click OK.
When you first start the Business View Manager, you ll initially see the Repository Explorer window appear on the right. As you continue to edit Business View objects with the Business View Manager, the Repository Explorer always appears (unless you auto-hide with the pin button, or turn it off from the View menu). Also, when you are prompted to save an object to the repository, you ll see an embedded version of the Repository Explorer in the Save dialog box.
Because Business Views is such an integral part of Crystal Enterprise and the repository, you ll find it helpful to understand how to make best use of the Repository Explorer. Also, because you can specify Business View object rights from the Repository Explorer, as well as when editing the object, it s helpful to know how to make these settings.
Notice that the folder structure of the repository is exposed in the Repository Explorer: your CE Crystal Management Server name appears at the top of the folder hierarchy, with top-level folders appearing below them. If you click the plus-sign next to a folder, it expands to show any subfolder or repository objects within it. Notice an additional folder labeled Custom Functions. This is the dedicated folder within the repository where all custom functions created in Crystal Reports are held.
Notice that, at least initially, you see all folders and all object types (even though not applicable to Business Views) in the repository. You may choose to apply a filter to limit objects shown, or choose options to limit the Repository Explorer to certain types of objects. To apply filters to limit the objects displayed in the explorer, click the Advanced Filtering toolbar button. You can also right-click anywhere within the repository folder or object list and choose Advanced Filtering from the pop-up menu. The Repository Explorer will display text boxes where you may specify a combination of object name text or author. When you click the Apply button, only repository objects that include the supplied text or author names will appear. If you wish to turn off any existing filters, simply click the Advanced Filtering toolbar button again, or right-click and click the Advanced Filtering option again. The complete list of objects will reappear.
You may also limit the types of repository objects that appear. For example, if you are working exclusively with Business Views for the time being, you may not wish to see text objects, bitmaps, or other Crystal Report “related objects in the Repository Explorer. To change view settings, click the Change View Settings toolbar button. You can also right-click anywhere within the repository folder or object list and choose Change View Settings from the pop-up menu. The View Settings dialog box will appear.
Uncheck repository object types that you prefer not to see. You may also choose how to sort objects in the Repository Explorer. Once you ve made your choices, click OK. The Repository Explorer will reappear with your new settings taking effect.
There are additional options for working with the Repository Explorer. The first option you have is to delete objects or folders from the repository. Simply choose the desired object or folder and press DELETE. Or, right-click the object or folder and choose Delete from the pop-up menu. You can also click the Delete toolbar button. If the object you attempt to delete is not referenced by any other objects, you ll see a simple confirmation request. However, if you attempt to delete a folder or a Business View object that is referenced elsewhere, you ll see a more elaborate dialog box indicating what else will be deleted if you proceed. Click Yes if you re sure you want to delete the objects.
Caution | Deleting objects from the repository is permanent ”you can t undo such a deletion. It goes without saying that you should have a regular program in your organization to back up the Crystal Management Server database in case you need to restore any inadvertently deleted repository objects. |
You may also desire to create a new folder within the repository to store Business View objects, or objects added from within Crystal Reports. You may either create a folder directly below the Crystal Management Server (known as a top-level folder ), or a subfolder within a top-level folder. In fact, you can create subfolders in subfolders. The key is what you have selected in the Repository Explorer before you click the New Folder button. If you select the Crystal Management Server, you will create a top-level folder. If you select an existing top-level folder or a subfolder, you will create a subfolder within the selected folder.
Once you ve selected the desired location for your new folder, right-click and choose New Folder from the pop-up menu. Or, click the New Folder toolbar button. A new folder will be created with the name New Folder. You ll be placed into edit mode on the New Folder name ”type the desired name for the new folder and click outside it to save the new name.
To rename an existing folder or object, select it. Then, simply hold your mouse button down for a few seconds until the object enters edit mode. You can also right-click an object and choose Rename from the pop-up menu. Or, select an object and press F2. The object will be placed into edit mode. Type a new name for the object (remembering that you can t use the same name as another object of the same type in the same folder) and click outside the object to save the new name.
And finally, you may choose to move or copy either individual repository objects, or entire repository folders, from one place to another in the Repository Explorer. Simply select the object or folder you want to move, hold your mouse button down, and drag it on top of another folder (or the Crystal Management Server itself to make it a top-level folder or object). If you wish to copy an object rather than move it, hold the CTRL key down when you drag. Once you drop the object in its new location, the Repository Explorer will show the new organization immediately. Note that if you attempt to move or copy a folder or object to a location that already has an object of the same name and type, you ll either receive an error message, or be warned that the move or copy will overwrite the existing object.
Note | The last three toolbar buttons are used to view dependent and referenced Business View objects, as well as to check dependent integrity for the selected Business View object. Discussions of these options appear earlier in the chapter, under Object Integrity and References. |
Although this chapter has already discussed applying row and column security via field and filter rights, you also have the ability to specify rights at the Business View object level. For example, you may prefer that only a limited set of Crystal Enterprise users or groups see a Business View when opening Crystal Reports. Or, perhaps you want to allow several members of your organization to design Business Views, but only the HR group to have access to the HR Information System Data Connections. By setting rights for the Business View object or the Data Connection object, you can control who can see, modify, or set security for various objects.
Not only can you set rights at the object level, but also at the folder and Crystal Management Server levels. When you set rights at a higher level, they are automatically inherited at lower levels. For example, you may set a certain set of rights at a Business Views folder level to have them trickle down to any Business View objects within the folder. This inheritance model (at least in theory) can simplify your administrative tasks by reducing the amount of rights setting that you have to accomplish throughout the repository.
You can set rights on Business View objects in two places within the Business View Manager:
When editing a Business View object, by selecting the object name in the Object Explorer and clicking the ellipses button next to the Rights property in the Property Browser.
By clicking the object in the Repository Explorer, right-clicking, and choosing Edit Rights from the pop-up menu.
Once you ve made this choice, the Edit Rights dialog box will appear, as illustrated in Figure 17-13.
You ll see a list of Crystal Enterprise groups and users and their existing set of rights (initially, you ll see just the Administrators and Everyone group here). Note that, depending on the type of object, three or four different rights can be set for each user or group:
View The ability to use the object within a Business View
Edit The ability to modify and delete the object
Set Security The ability to change repository security settings for the object using this dialog box
Data Access The ability to view the set of data coming from this datasource
Further, if you cycle through the available options for each right by clicking the check box, you ll notice that a right can be granted, denied, or inherited. Granting the right explicitly gives that right to the chosen group or user. Denying the right explicitly takes the right away from the chosen group or user. And, allowing the right to be inherited will grant or deny the right based on higher-level security settings.
If you wish to specifically grant or deny rights to additional groups or users, you ll need to add the group or user to the list by clicking the Add Groups or Add Users button in the Edit Rights dialog box toolbar. These buttons will display an additional Add Groups or Add User dialog box showing all Crystal Enterprise groups or users (to actually create additional CE groups or users, you must use other CE administrative tools, such as the Crystal Management Console ”you can t add these here). Use this dialog box to choose an additional group or user to add to the Edit Rights dialog box.
Once the additional groups or users you ve added appear in the Edit Rights dialog box, you can grant or deny rights to that group or user by clicking the appropriate check boxes. If you wish to remove a group or user that you previously set rights for, simply select the user or group and click the Delete button in the toolbar.
Because of inheritance from upper-level folders, you may ultimately not assign the set of rights you expect. To understand what rights are ultimately given, you may want to see the set of net rights, which take inheritance into account. Do this by clicking the Preview button in the toolbar. The list of users and groups will change, showing the actual combination of rights that result from explicit settings and inheritance. If you need to change any rights, click the Preview button again to return the list to its editable state.
Once you ve set rights for all necessary groups and users, just click OK to close the Edit Rights dialog box. If you are editing a Business View object, you should save the object to ensure that the new rights settings are saved to the repository. Click the Save toolbar button or choose File Save from the Business View Manager pull-down menus.
Note | A more thorough discussion of repository rights, including the rules of inheritance, can be found in Chapter 7 under Controlling Repository Rights. |