Creating a view
The View is a metadata layer used by BMC Remedy Smart Reporting to hide the complexity of database structures from Report Writers. The View is used to define which columns in your database you wish to make available for Report Building. These fields may come from multiple tables and therefore will require joins to be defined (the business logic that links rows in a table together).
The two major steps in creating a view include:
- Relationship Entity Diagram—Selecting the tables you need from your database and defining how data in these tables are joined.
- View Field Selection—Defining which fields you want to make available from these tables and providing metadata for them.
If you have not installed BMC Remedy IT Service Management and want to create a View in BMC Remedy Smart Reporting, ensure you create the Content Folder and Content Sub Folder first and then create the View and Report.
This section explains the following topics:
When you use newly created semantic views (not the out-of-the-box semantic views) in a virtual table, the Available Fields list in the virtual table may not display the fields from the newly created semantic view. To be able to view the semantic view fields in a virtual table, you need to obtain the Skip Schema Check permission from BMC Remedy Smart Reporting super admin (siadmin) before creating a semantic view. As users with Public Content Writer & Collaborator - Advanced role can create semantic views, siadmin must provide the Skip Schema Check permission to the Public Content Writer & Collaborator - Advanced role.
If you are using a custom role which allows you to create semantic views, you must request your siadmin to provide the Skip Schema Check permission to the custom role before creating semantic views.
Providing Skip Schema Check permission to the Public Content Writer & Collaborator - Advanced role
- Log on to BMC Remedy Smart Reporting as a super admin (siadmin).
- Navigate to Admin Console > Roles.
- Click the Roles panel to expand it.
- Click the drop-down list next to the Public Content Writer & Collaborator - Advanced role.
- To update the permissions, click Edit.
- In the Functions section, click the Data Sources & Views sub section to expand it.
- Select the Skip Schema Check field to attach the permission to the Public Content Writer & Collaborator - Advanced role.
- Click Save.
To create a view
- Use one of the following methods:
- Left Side Nav—Open the left side navigation panel, click Create and select the View option.
- Top Right Button—Click Create and select the View option.
- Toolbar—Click on the Create link in the toolbar and select the View option.
- Admin Console—Navigate to the Admin Console, open the Views section, click Add.
- On the New View lightbox, either select your data source or create a new source.
The basic parameters required for your view are displayed.
- Click Edit View to access the main view builder.
The view builder page is displayed along with a list of tables in the Database Tables panel on the left hand side and the Table Options on the right hand side of the canvas.
- Update the view name and description in the View Options menu.
- Enter the View Description and click Create Analysis.
The view is now created.
The Entity Relationship is one of the key components of the view builder, which allows you to define all the key relationships between the selected database tables.
- From the table list on the left of the screen, drag the required tables onto your canvas.
- On the AthleteFact table, click the join link to open a join pop-up window to create a join between the tables and enter the following information:
- Join From
- Join Type
- Join To
- Join logic
- Click Add to add to the join list.
The join logic is displayed on the right.
- Click Save & Close to save your join.
The join is now displayed as a line between the tables.You can hover over the join icon to display the join logic in a tooltip format.
For more information, see Model.
You can select the fields that you want to make available to your end users for reporting. Only columns selected from each table in your Unattached list will be available for reporting.
- Click on the expand icon next to a table name to expand it.
- Click the Properties link on the required table to display the table properties in the View Options panel.
- Click the Columns section link to open the options.
A set of columns from the table will be displayed.
- Select the required columns.
- Click on the Properties link again to update the diagram.
The columns that you selected now appear in bold on the table.
- Repeat the last step for each table.
- Click Prepare in the navigation bar to continue to the data preview page.
For more information, see Table Properties.
Field Categories & Metadata
Initially, fields selected from the previous step will all be in the Unattached panel in folders that represent the tables that they originated from. These fields have not had meta data associated with them and cannot be used by your report writers. You must assign fields to folders in the Available Fields panel. This helps you to organise your fields in a way that is logical for the Report Writer, giving you the chance to group them differently than the table structure in the database.
Before you begin, make sure you have the categories you want to use to divide your fields.
- Click on the Add/Edit Folders link from the Create menu.
- Add the required folders.
- Click Submit to add the folders.
- Click the Add Fields option in the Create menu to add more fields to your folders.
- From the table, either select and drag the fields individually or use the Shift option to click on each of the required fields to drag these into the required folder.
The column names now appear in bold indicating that they have been added to the view.
- Follow the above steps to put all the fields in their correct folders.
- Click the field heading to update the field name.
- Click on the drop-down list on the required field and select the Edit Format option.
- Open the Format section of the menu.
- Set the Format option to Reference Code.
For more information, see Reference Code Use.
- Select the required value from the drop-down list.
- Click Close to commit your changes and update the column.
The field format option decides how the field will be used on the report. Follow the steps given below to change a format for a specific field on a report.
- Click on the Field Settings menu to access formatting options for all your fields.
- Locate and click on the required field in the respective folder.
- Expand the Format section.
- Add the required values for the Prefix and Decimal Places option.
- If required, apply a colour for chart display.
- Close the menu to apply your changes.
For more information, see Field Settings.
In addition to fields from your database you can create calculated fields, pre-defined filters, and date hierarchy fields.
This type of calculated field allows you to build a calculation that will return a numeric value as the result. In this example we will aim to calculate profit by subtracting cost from invoice figures.
- Click Create and select the Calculated Field option.
- On the Calculated Field window, set the Calculated Field Name to Profit.
- Set the Field Folder to Athlete Payment.
- Leave the Formula Type as Simple.
- From the Select Field drop down search for INVOICEDAMOUTNT and click it to build it into the calculation.
- Click - (minus) directly below the Select Field drop down.
- Select the COST field to finish this simple calculation.
- Click Validate for BMC Remedy Smart Reporting to validate your calculation. You should see a SQL is valid message displayed above the builder if successful.
- Click Save to save the field and make it available for use in reports.
- You will now see the Profit calculated field in the Athlete Payment category and it will have a green icon instead of the usual metric icon to show that it's a formula. See Calculated Fields for more information.
Date Hierarchy Fields
Date Hierarchy calculated fields allow you to build levels of a hierarchy based on a single date field in your database. This can then be used to define Drill Down hierarchies, or for other purposes in reports.
- First you will need to ensure you have a date field to use with the hierarchy templates. We've already got the InvoiceDate field in the Date Fields folder, so this has been taken care of.
You are now going to use the Date Function builder to create the other levels of your hierarchy, adding them to the same folder as your date field - this is important for when you build the hierarchy later.
Start with the Month Start Date. The reason we're using the Month Start Date is so that the field is still a date format, even though we can change the display to be just the Month component. This means we can use it for Time Series charts and other date related functionality.
- Click on the Create button and select the Date Function option.
- Select the INVOICEDDATE field from the Date Fields folder to base the function on.
- Set the Date Function field to be Month Start Date.
- Set the format to be Month Name. This will mean that the name of the date's month will be displayed in reports and charts, but underneath it will still be a date value.
- Click Save to complete the function..
- Repeat the same process, this time creating a Year field based on Year Start Date of Invoiced Date.
- You will now have three levels on which to create a date hierarchy (see the next section).
Drill Down Hierarchy
The hierarchy allows report users to drill down a dimensional hierarchy by limiting the result set as they select one level to the next. For example drill from Year (2014) to Month (August) etc.
When creating the hierarchy, you need to start from the top level and work your way down. In this example we are creating a Year > Month > Date hierarchy, so we will start with the Year field at the top.
- Click on the menu on your Year field and select the Drill To option, then click on the field you want to drill down to (Month Start Date)
- You will now notice that there is a link between the Year and Month fields. This lets you know there is a hierarchy link defined between the two fields.
- Next repeat the process by clicking on the Month field drop down menu, navigate to Drill To, and specifying the Invoiced Date field.
- You will now see there is a 3 level hierarchy defined. You wont have to define Drill Down options on the bottom level (Invoiced Date).
- Once you rename the fields, you'll have a clean hierarchy, ready for use in a report. See Drill Down Hierarchies for more information.
View Summary & Saving
- From the any step of the builder you can click on the View menu and save your view.
- Select the Save option.
- Update the view name and description if required. Specify a content folder and sub folder to store the View in.
- Click Save and Publish to complete.
(BMC Remedy Smart Reporting versions earlier than 9.1.03) Click the following video to view the process of setting the security options for a view.