A TLX report is a model validation report that uses erwin Template Language (TLX). Report Designer includes some default validation reports and also lets you configure new reports with custom properties. You must be familiar with erwin Template Language (TLX) to configure new reports.
When you configure new reports, you can add two types of custom properties, filters and TLX properties. The code for a filter includes a function that returns TRUE or FALSE.
Report Designer includes default TLX reports at entity/table, attribute/column, domain, and relationship level. Some of the properties that are included in the default TLX reports are no definition or no primary key. This topic describes how you can create an entity/table level report as an example. You can create other TLX reports on the same lines as described in the procedure.
To create an entity/table level report, follow these steps:
The list of entities and tables that do not have a definition or a comment is displayed.
If you are familiar with TLX scripting, you can add your own functions for properties of your choice and configure custom reports. For example, you can create a report that gives the number of attributes in each entity. You can add two types of custom properties, filters and TLX properties. The code for a filter includes a function that returns TRUE or FALSE.
To configure a new report, you must modify the following configuration files:
These files are available in the <erwin install folder>\Report\TLX folder.
Follow these steps to create a custom TLX report:
Modify the TLXReportAssembly File
To display a property under the Filter By node or the Property node in the Report Designer, you must add an entry for the property in the TLXReportAssembly file.
The TLXReportAssembly.xml file includes the following parameters:
Specifies the unique identifier for the property entry in the TLXReportAssembly file. You can enter any number of your choice, as long as it is unique within this file.
Specifies the owner ID for the object for which you want to create a custom property. Use the following owner IDs:
Owner ID |
Object |
1075838979 |
Entity/Table |
1075838981 |
Attribute/Column |
1075838983 |
Domain |
1075839016 |
Relationship |
1075838985 |
Key Group |
Specifies the name of the custom property the way it appears in the Report Designer.
Specifies the type of report for which the custom property is available. 1 denotes Logical, 2 denotes Physical, and 3 denotes Logical/Physical.
Specifies the database for which the custom property applies. Enter the information in the format, "database brand code, major version number of the database, minor version of the database."
A value of "0,0,0" indicates that the custom property applies to all databases. The following table provides the DBMS information for the databases that the current release supports:
Database |
DBMS Info in TLXAssembly |
DB2 for i 5.x/6.x/7.x |
(1075859019,4,0) |
DB2 for LUW 9.5 |
(1075858977,9,5) |
DB2 for LUW 9.7/10.x |
(1075858977,9,7) |
DB2 for z/OS 8.1 |
(1075858978,8,1) |
DB2 for z/OS 9.1/10/11 |
(1075858978,9,1) |
Hive 2.1.x |
(1075859187,2,1) |
Informix 10.x/11.x/12.x |
(1075859006,9,2) |
MySQL 5.x |
(1075859129,5,0) |
ODBC/Generic 2.x |
(1075859009,2,0) |
ODBC/Generic 3.x |
(1075859009,3,0) |
Oracle 10g |
(1075858979,10,0) |
Oracle 11g/12c |
(1075858979,11,0) |
PostgreSQL 9.6 |
(1075918977,9,6) |
Progress 9.x/10.x/11.x |
(1075859010,9,0) |
SAS |
(1075859013,1,0) |
SAP ASE 15.x/16 |
(1075859017,12,5) |
SAP IQ 15.x/16 |
(1075859130,15,0) |
SQL Azure |
(1075859180,10,25) |
SQL Server 2008 |
(1075859016,10,0) |
SQL Server 2012 |
(1075859016,11,0) |
SQL Server 2014 |
(1075859016,12,0) |
SQL Server 2016 |
(1075859016,13,0) |
Teradata 14.10 |
(1075859018,14,10) |
Teradata 15.x/16.10 |
(1075859018,15,0) |
Specifies the TLX function name for the custom property. The function name can be any name that describes the property.
Specifies whether the custom property is a filter or a property. Include a value of 1 for filter and 0 for property. If you include 1, the property is displayed under the Filter by node of the corresponding object. If you include 0, the property is displayed under the Properties node of the object in Report Designer.
Follow these steps:
Modify the TLXReportTemplate.FET File
The TLXReportTemplate.FET file includes the functions that help the Report Designer generate the report for a TLX property. You must modify the file to include the function for a custom property for which you want to generate a report.
Note: Use the same function name in the TLXReportAssembly and TLXReportTemplate files.
Follow these steps:
Now the custom property appears in the Report Designer under the corresponding node. You can include the property in a report.
This example demonstrates how you can generate a report on the custom property Number of Attributes in an Entity. This property is of type TLX property.
Follow these steps:
Add an Entry to the TLXReportAssembly.xml File
Follow these steps:
<Assembly Id="1002" OwnerId="1075838979" Name="Number of Attributes" ExtractType="1" DBMSInfo="0, 0, 0" TLXFunction="NumberofAttribute" IsFilter="0"/>
Add the TLX Function NumberofAttributes to the TLXReportTemplate.FET File
Follow these steps:
Add the following code to the TLXReportTemplate.FET file and save the file:
SPItemBegin = NumberofAttribute
[
Set("Count", 0)
ForEachOwnee("Attribute")
{
Increment("Count")
}
Value("Count")
]
SPItemEnd
Number of Attributes is added to Report Designer under Entity, Properties.
Create a Report and Include the Number of Attributes Property
Follow these steps:
Copyright © 2017 erwin Inc.
All rights reserved.
|
|