reports advanced cookbook 7.1

Upload: anjit-rajkarnikar

Post on 13-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Reports Advanced Cookbook 7.1

    1/43

    alfabet Custom Reports 7.1Advanced Reporting

    Cookbook

  • 7/25/2019 Reports Advanced Cookbook 7.1

    2/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 2

    alfabet AG

    This document contains the follow-up material for your custom report training for advancedreporting. It assumes that the reader has taken part in both a basic and advanced reportingcourse and feels comfortable writing alfabet and/or SQL queries.

    Use the following pages to memorize the trainings contents and exercises. Based on thescreenshots in this document, you can re-build some of the reports which were developed

    during the training, step by step. Additionally, you will find some helpful hints next to mostscreenshots.

    This document is intended to be an aid to memory. The eXpand documentation (expand.pdf)provides in-depth information about all properties and options concerning report definitionsand the alfabet Query Language.

    Recent configuration changes are marked as new in 7.1.

    Chapter Overview

    The chapters Graphical reports, Business Chart Reports and Editable Matrix Reportsdescribe how to create and configure reports of the respective type. The chapter Graphicalreportsalso contains information about color rules, size rules and indicator rules.

    In the chapter Limitations of Native SQL Reports, you will find some information on what tokeep in mind when using SQL queries in planningIT. There is also information about thecorrect usage of instructions.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    3/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 3

    alfabet AG

    Table of Content

    1 GraphicalReports............................................................................................................................4

    1.1 TreeMapReports.....................................................................................................................4

    1.2 LayerDiagramReports.............................................................................................................6

    1.3 LaneReportsnewin7.1.......................................................................................................9

    1.4 & 1.5 GridReports&ClusterMaps....................................................................................13

    1.6 & 1.7 & 1.8 MatrixReports.............................................................................................16

    1.9 LifecycleReports(GanttCharts).............................................................................................20

    1.10 EvaluationReports...............................................................................................................23

    1.11 HTMLbasedIndicatorReportsforObjectViews................................................................25

    1.12 MultipartReports(WorldMap)..........................................................................................26

    1.13 CustomizationRules.............................................................................................................28

    1.13.1 ColorRules.....................................................................................................................29

    1.13.2 IndicatorRules...............................................................................................................30

    1.13.3 SizeRules........................................................................................................................30

    2 BusinessChartReports(Pie,Line,BarandRadarCharts).............................................................31

    3 EditableMatrixReports.................................................................................................................34

    3.1 & 3.2 EditableRelationshipMatrixforReference/ReferenceArray.................................34

    3.3

    EditableRelationship

    Matrix

    via

    Relationship

    Class

    new

    in

    7.1

    .........................................

    37

    3.4 EditableRelationshipMatrixforBusinessSupports...............................................................38

    4 LimitationsofNativeSQLReports.................................................................................................40

    4.1 REFSTRinSELECT....................................................................................................................40

    4.2 ExamplesforJOINS.................................................................................................................40

    4.3 FiltersinSQLreports...............................................................................................................40

    4.4 CascadingFiltersnewin7.1...............................................................................................41

    4.5

    DataTranslation

    ......................................................................................................................

    41

    4.6 EvaluatingMandates..............................................................................................................42

    4.7 UsingInstructionsinNativeSQLReports...............................................................................42

  • 7/25/2019 Reports Advanced Cookbook 7.1

    4/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 4

    alfabet AG

    1 Graphical Reports

    This chapter will look at the different types of visual reports you are able to create witheXpand.

    At the end of this chapter, customization rules such as color rules, size rules and indicator

    rules are also described in details.

    Please note that different types of customization rules are only applicable to certaintypes of graphical reports.

    1.1 Tree Map Reports

    Tree Map Reports list a number of objects on a horizontal axis, and below each object a listof related objects.

    These objects can be colored, display an indicator, and can be differently sized.

    Creating a Tree Map Report

    1. Create a new report

    2. Set Type = Custom

    3. Set Templ at e = TreeMapReport4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click report and select St ar t al f abet Repor t Assi st ant

    6. Set the Layout = TreeMap7. Right Click on the Root Queries and Add New Root Quer y

  • 7/25/2019 Reports Advanced Cookbook 7.1

    5/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 5

    alfabet AG

    Building Root Queries for Tree Map Reports

    1. In the Root Query click on Alfabet Query and on the ellipsis button [...] to open theAl fabet Query Builder2. Choose the class from which the objects will be used for columns3. Specify the Propertiesthat are to be displayed from the class

    It is possible narrow results down with filters by adding Whereparameters if required.

    Adding class entries

    Class entries are used in the Tree Map Report to fill the columns with content.

    1. Right click on Name of the Tree Map Report and Add new Cl ass Ent r y2. Select the class that also has been used for the Root Query

    3. Right click on the Class Entryand Add new Quer y4. Click on the new query and open theAl fabet Query Builder5. Select the Classthat should actually be used to fill the columns6. With the query join the class that has been used as the base or like in the displayed

    case the class that is directly connected to the base class

    7. Add a Wherefilter with the : BASEparameter related to the base class

  • 7/25/2019 Reports Advanced Cookbook 7.1

    6/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 6

    alfabet AG

    1.2 Layer Diagram Reports

    Layer Diagrams display objects of connected classes arranged in layers (one layer perclass).

    On the finished report, the user can select any one object. Clicking Show Connected Itemswill reveal which objects or foreign classes are connected to the selected object.

    Objects of the report can be colored using color rules, and can display indicators usingindicator rules.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    7/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 7

    alfabet AG

    Creating a layer diagram definition

    1. Create a new report

    2. Set Type = Custom3. Set Templ at e = TreeMapReport4. Right click report and select Cr eat e Cust om Report Vi ew

    5. Right click report and select St ar t al f abet Repor t Assi st ant

  • 7/25/2019 Reports Advanced Cookbook 7.1

    8/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 8

    alfabet AG

    6. Set Layout = LayerDiagram7. Right-click Root Quer i es and select add new Root Quer y8. For each object class selected by your query, add a new Class Entry (right-click

    report node and select add new Cl ass Ent r y)

    The objects displayed in the column headers and the columns of the report are found viaqueries defined for the elements of the report. The queries can either be native SQL queriesor alfabet queries.

    The information displayed in the object boxes of the report is identical to the column headersthat result from a tabular output of the defined query.

    The first column of the output of a native SQL query, as this column must specify the

    REFSTR of the object for technical reasons and is ignored in the visible output.

    Creating a layer diagram Query

    The complete content of the report is defined in one query resulting in a grouped data set.

    When separate queries are defined, a high number of queries must be executed bythe database to display the report (eXpand 6.1). This can lead to performance issues.Therefore, it is recommended to base the report on a grouped dataset defined in asingle query (eXpand 7.0 and later).

  • 7/25/2019 Reports Advanced Cookbook 7.1

    9/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 9

    alfabet AG

    Add Gr oupBy_Ex and RemoveCol umns Instructions:

    1.3 Lane Reports new in 7.1

    Lane Reports display lanes containing various objects, and show connections between theseobjects in the form of arrows. Like Layer Diagrams, Lane Reports have a Show ConnectedItems button.

    Objects of the report can be colored using color rules, and can display indicators usingindicator rules.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    10/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 10

    alfabet AG

    Creating a lane report definition

    1. Create a new report

    2. Set Type = Custom3. Set Templ at e = LaneReport4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click report and select St ar t al f abet Repor t Assi st ant

  • 7/25/2019 Reports Advanced Cookbook 7.1

    11/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 11

    alfabet AG

    Defining the Lane Report

    1. Right-click the root node and select Add New Lane. Create as many lane entries asyou need. For each lane entry, a sub-node called Nodeand a sub-node called Li nkare automatically created.

    2. On each lane node, select Add New Quer y. Specify a query that returns the desiredobjects to be displayed in that lane. (You can add more than one query element here lanes are not limited to displaying objects of only one class.)

    3. On each link node that has a predecessor and a successor lane node, select AddNew Quer y. Specify a query that returns the REFSTR of both lane nodes objectclasses. (If one of the connected lane nodes has more than one query, the link node

    will also need to have more than one query.)

  • 7/25/2019 Reports Advanced Cookbook 7.1

    12/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 12

    alfabet AG

    Note that the last lane node will not have to have a link node query, as that link willnot have a second lane node to connect to.

    4. Lastly, go to the link nodes themselves. On each link node, enter the returned

    REFSTRs of the two connected lane nodes objects to the Fr omCol umnandToCol umnproperty. This way, the link node will know exactly how the lane objectsare connected with each other.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    13/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 13

    alfabet AG

    1.4 & 1.5 Grid Reports & Cluster Maps

    Grid Reports display hierarchical relations in form of a tree.

    Cluster Maps are grid reports with a slightly different layout: related objects are not displayedas tree twigs, but as smaller cells contained in their parent objects cell.

    Creating Grid Reports

    1. Create New Report

    2. SetType= Custom and selectTempl at e= GridReport3. Right click on the report and create the Report View4. Right Click on the Report and start theAl fabet Report Assis tant

    Defining the Grid Report

    1. Right click on the name of the report and Add New Cel l 2. Right click on the cell and Add New I t em

  • 7/25/2019 Reports Advanced Cookbook 7.1

    14/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 14

    alfabet AG

    3. It is required to specify the Class Namefor the new item (for the first class its usuallythe base class that is to be used). Create subordinate items for all subordinateclasses that will be used in the query.

    4. Right Click on the first Item and Add New Quer y5. Click on the query and open theAl fabet Query Builder

    In the cell settings it is mandatory to specify what kind of grid report the user wants to create:

    Adding instruct ions

    1. Switch to the tab Instructions.

    2. Use the Gr oupBy_Ex instruction to group the displayed properties3. Its mandatory to use the REFSTR property for the the group by function. It doesnt

    work properly with other properties.4. Add a RemoveCol umns instruction to hide REFSTRs from the final report

  • 7/25/2019 Reports Advanced Cookbook 7.1

    15/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 15

    alfabet AG

    It is possible to add Color Rulesand Indicator Rules. The creation process is the same asin Tree Map Reports .

  • 7/25/2019 Reports Advanced Cookbook 7.1

    16/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 16

    alfabet AG

    1.6 & 1.7 & 1.8 Matrix Reports

    Matrix Reports can display any relationship in matrix form.

    There are currently three types:

    Matrix Report (Diagram)In reports of the type Diagram,- the column and row headers will scroll out of the screen,- boxes will be displayed with rounded corners,- an indicator rule can be used for cell objects

    Matrix Report (Affinity)In reports of the type Affinity,- the column and row headers are fixed during scrolling,- boxes will be displayed with sharp corners,- indicator rules cannot be used

    Matrix Report (Extended)new in 7.1In reports of the type Extended, a menu labeled View will automatically beavailable on the finished report. This menu contains some display options known frombusiness support maps, for example to flip axis or join items.

    Please note that the new report type, Matrix Report (Extended), is still in anexperimental stage and might not work as expected.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    17/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 17

    alfabet AG

    Creating a matrix report definition of type Diagram or Affini ty

    1. Create a new report

    2. Set Type = Custom3. Set Templ at e = MatrixMapReport4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click report and St ar t al f abet Repor t Assi st ant

    The Render Typecan be set to Diagram orAf fini ty Matrix the general options remainthe same.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    18/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 18

    alfabet AG

    Queries attached to the rows and columns define what will be displayed on the X- and Y-axis. A separate query is used to fill the cells, and create a link from the objects to bedisplayed in the cells to the objects on the two axis.

    Like in other graphical report types, Color Rules and Indicator Rules can be attached tocustomize the output some more.

    Queries for the rows, columns and cells

    Query example for the rows:

    Query example for the columns:

  • 7/25/2019 Reports Advanced Cookbook 7.1

    19/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 19

    alfabet AG

    Query example for the cells:

    Please note that the cell querys show properties have to include both REFSTRs of

    the according objects on the X- and the Y-axis, in the first and second position. This ishow planningIT established which objects to place in which cells.

    You can see what goes where on the top node of this report in the alfabet ReportAssistance editor. It specifies a Column Ref Index and a Row Ref Index. Forinstance, if Column Ref Index = 1 and Row Ref Index = 2, the first REFSTR of the cellshow properties will be matched to the columns (y axis) objects, and the secondREFSTR of the call show properties will be matched to the rows (x-axis) objects.

    Creating a matrix report defin ition of type Extended

    1. Create a new report

    2. Set Type = Custom3. Set Templ at e = MatrixMapReport_Ex4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click report and St ar t al f abet Repor t Assi st ant

    From here, proceed as usual; please bear in mind that this report type is still in development.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    20/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 20

    alfabet AG

    1.9 Lifecycle Reports (Gantt Charts)

    Gantt Charts are used to display lifecycle information. The customizable XML based ganttchart report allows you to select which objects lifecycles you want to display together.

    Creating a Gantt Report

    1. Create a new report

    2. Set Type = Custom

    3. Set Templ at e = GanttReport4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click on the report and St ar t al f abet Repor t Assi st ant

  • 7/25/2019 Reports Advanced Cookbook 7.1

    21/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 21

    alfabet AG

    Adding Items to the Gantt Report

    In the Report Assistantfor Gantt Chartsonly one type of item can be added (Right clickAdd New I t em).

    The first item will contain the query that finds the objects to be displayed (more informationon this in the next paragraph).

    The subordinate items are used to layout the subordinate objects returned by the query one item per object class. On these items, you can decide how the lifecycle should bedisplayed, whether to display the time between start date and end date as a rectangle or line,

    and what color it should be. It is easiest to simply put the word Default in the LC Quer y

    field, so the lifecycle will appear exactly the same as in planningIT.

    Defining the content of the report

    Open theAl fabet Query Builder in the first item attached to the report. Queries can be buildin the same way as displayed in other reports.

    The REFSTR has to be included in the Show Properties so that instructions can be used.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    22/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 22

    alfabet AG

    Defining the instructions

    Open the Instructions Tab.Several instructions like Gr oupBy_Exand RemoveCol umns are required. It also makes sense get several columns together by usingJ oi nCol umnsfor abetter overview in the finished report.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    23/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 23

    alfabet AG

    1.10 Evaluation Reports

    Evaluation Reports let you display and edit evaluations. It is one of few editable report typesthat you can create in eXpand.

    Creating an evaluation report definition

    1. Create a new report

    1. Set Type= Custom2. Set Templ at e= EvaluationReport3. Right click report and select Cr eat e Cust om Report Vi ew

    4. Right click on the report and St ar t al f abet Repor t Assi st ant

    Settings in the report

    It is possible to add i t ems with queries to define the content displayed in the report. Alsoitems to add the Evaluation types can be attached.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    24/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 24

    alfabet AG

    To see the Evaluation types open of the items and on Eval uat i on Type. Click on the [...]button. You can add more than one evaluation type.

    Query for the Evaluation Report

    To add a query in the Evaluation Report select one of the items and Start alfabet Query

    Builder. After building the query its necessary to add Gr oupBy_Ex instructions.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    25/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 25

    alfabet AG

    1.11 HTML-based Indicator Reports for Object Views

    These reports show selected indicators of one object class. If icons have been previouslydefined for the indicator, they can be displayed as icons or gauge. They can be included inobject views and displayed with preview.

    With eXpand 7.0 the enhanced cockpit designer was released. The cockpits can befully customized to display various types of data, including indicators and indicatoricons. That makes this report type largely obsolete.

    Creating an HTML-based ind icator report definit ion

    1. Create a new report

    2. Set Type= Custom3. Right click report and select Cr eat e Cust om Report Vi ew4. Select the report view and click on its center pane

    5. Set Sour ce= Object_Indicators_Html_Report

    6. Set SubType = HtmlView7. Open XMLDef8. Write or paste report xml definition

  • 7/25/2019 Reports Advanced Cookbook 7.1

    26/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 26

    alfabet AG

    Editing the xml

    Specify the indicator types whose values should be displayed. Specify whether the valueshould be displayed as icon or gauge and the gauge specifications.

    1.12 Multi -part Reports (World Map)

    Multi-part reports display several slave reports related to a world map master report.

    Please note that this report type is still in an experimental stage and might not workas expected.

    The world map master report displays bullets on a world map (based on pixel coordinates)that link to planningIT object instances.

    The bullets displayed contain references to planningIT objects. The selected object serves as

    : BASEobject for any slave reports in the background.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    27/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 27

    alfabet AG

    Creating a multi-part report definition

    The creation process for multi-part reports is still in development. Please copy an existingmutli-part report from the showcase database and use it as a template for your report.

    Editing the xml

    Specify the base objects for the slave reports and the coordinates for the bullets representingthese objects.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    28/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 28

    alfabet AG

    1.13 Customization Rules

    Most graphical reports support one or several types of customization rules. That means thatyou can give the objects displayed in the graphical report a different appearance based onany condition.

    The conditions exist in form of additional mini-queries. There are different ways ofimplementing rules, and different report types support different types of customization rules.

    Type of report /supports rule type

    Color Rule Indicator Rule Size Rule

    Tree Map Report

    Layer Diagram Report

    Lane Report

    Grid Report

    Cluster Map

    Matrix Report (Diagram)

    Matrix Report (Affinity)

    Matrix Report (Extended)

    Gantt (Lifecycle) Report

    Evaluation Report

    Evaluation Report forObject Views

    Multi-part Report

  • 7/25/2019 Reports Advanced Cookbook 7.1

    29/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 29

    alfabet AG

    Rules of type ObjectQueryjust return the REFSTR of the object to be colored/sized/etc. Youwill need one rule per color/per size/per indicator.

    Rules of type ColorQuery/SizeQuerywill return a set of colors/sizes (joined together byusing UNI ON ALL ). You will only need one color/size rule per set of colors/sizes. Theadvantage of this approach is that you can use parameters inside the SQL statement, which

    will allow the end user to select criteria which will be applied dynamically when running thereport.

    1.13.1 Color Rules

    You can color individual objects on the layer diagram report according to rules that youspecify in form of queries.

    1. Right-click on Report Node and select Add new Col or Rul e2. Pick a Fore and Back Color for the rule or choose Type = TypeQuery3. Specify a Query to select the Objects which should be colored

    Type= ObjectQuery:The query defined for the color rule returns the REFSTR of the objectthat the color shall be applied to. The colors that shall be applied to the object boxes aredefined separately via attributes of the color rule.

    Type = ColorQuery:The query defined for the color rule not only returns the REFSTR ofthe objects that the color shall be applied to but also the HTML-compliant specification of thecolors to be applied to the object boxes.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    30/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 30

    alfabet AG

    1.13.2 Indicator Rules

    You can display a previously configured indicator (in icon form) on the objects of a layerdiagram. This works almost exactly like creating a color rule.

    Type = ClassName: The indicator is displayed in the object boxes of all objects of the

    object class defined in the attribute Class Name of the indicator rule. The indicator type andevaluation type of the selected indicator are specified in the attributes Evaluation Type andIndicator Type of the indicator rule to define the indicator.

    Type = ObjectQuery: The indicator is displayed in the object boxes of a subset of objects ofthe object class defined in the attribute Class Name of the indicator rule. The query definedfor the indicator rule returns the REFSTR of the objects of the specified class that shall havean indicator icon displayed in the object box. The indicator type and evaluation type of theselected indicator are specified in the attributes Evaluation Type and Indicator Type of theindicator rule to define the indicator.

    Type = TypeQuery: The query defined for the indicator rule not only returns the REFSTR ofthe objects that the indicator shall be displayed for but also a reference to the indicator (e.G.for selecting the indicator via filter).

    1.13.3 Size Rules

    Size rules determine which displayed objects should be of small, medium or large size. Theonly report type that supports this right now is the Tree Map Report.

    Type= ObjectQuery:The query defined for the size rule returns the REFSTR of the objectthat the color shall be applied to. The colors that shall be applied to the object boxes aredefined separately via attributes of the color rule.

    Type = SizeQuery:The query defined for the size rule not only returns the REFSTR of theobjects that the color shall be applied to but also the size as specified in the SQL.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    31/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 31

    alfabet AG

    2 Business Chart Reports (Pie, Line, Bar and Radar Charts)

    Business Charts allow you to display report results in pie, line, bar and radar form.

    Creating a business chart report

    1. Create a new report

    2. Set Type= Custom

    3. Set Templ at e= BusinessChartReport4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click on the report and St ar t al f abet Repor t Assi st ant

    There will be a default query in the alfabet Report Assistant. This query is predefinedas an example and is always the same for this type of report. You can overwrite itwith your own AQL or SQL query.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    32/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 32

    alfabet AG

    Creating the query

    On the tab Data Source Definition, specify your query. You can use native SQL or AQL.

    On the tab Data Source Resul t, you can preview or check your query results in tabular form.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    33/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 33

    alfabet AG

    Working with the alfabet Report Assistant for Business Charts

    On the tab Business Graphic Definition,

    1. Check for error messages

    2. Select Business Chart Type3. Select x-axis values (in a pie chart, this is the slice labels)4. Select y-axis values (in a pie chart, this is the slice sizes)5. Fill in titles and pixel dimensions6. Select the object to activate a color button in the report and add the possibility to use

    links to the specified object while using Silverlight7. In case of a line chart or bar chart, several series of data can be displayed. In this

    case, specify Serie Column(s).8. In case of a bar chart, you can select either horizontal or vertical orientation for the

    bars, and can choose whether the series values should be stacked into one bar, or berepresented by differently colored bars.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    34/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 34

    alfabet AG

    3 Editable Matrix Reports

    There are three kinds of editable Matrix Reports:

    Relationship Matrix for direct relationshipscan be used to edit single or multiple

    reference relationships during runtime. This will work for any direct relationship, such as

    Responsi bl eUser ( Ref er ence) or Responsi bl eUser Gr oups( Ref er enceAr r ay) , but not if the relationship is specified by a relationship object of itsown class, such as InformationFlow or Role.

    Relationship Matrix for indirect relationshipscan be used to create relationship objects toimplement more compley relationships. These are limited to the following classes:- BusinessDataUsage- DemandArch- PlatformElementDependency- ProjectArch- ValueNodeArch

    Business Support Matrixcan be used to create new business support objects. You cancreate new business support objects, but in order to edit them (edit start date, end date, etc.)you have to navigate to them first using other ways.

    Please note that these reports ignore any user rights. They should be made availableonly to administrators, not regular users of plannningIT.

    3.1 & 3.2 Editable Relationship Matri x for Reference / ReferenceArray

    Creating a relationship matrix for any direct relation

    1. Create a new report

    2. Set Type= Custom3. Set Templ at e= Relationships_TableReport4. Right Click on the report and Cr eat e Cust om Report Vi ew

    5. Right click report and select St ar t al f abet Repor t Assi st ant

  • 7/25/2019 Reports Advanced Cookbook 7.1

    35/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 35

    alfabet AG

    There will be a default query in the alfabet Report Assistant. This query is predefinedas an example and is always the same for this type of report. You can overwrite itwith your own query.

    Rows and Columns Definit ion

    Specify queries (native SQL or AQL) to find the rows and the columns of the matrix report.

    The Row query will return the object on on side of the relationship, and the Column query willreturn the object on the other side.

    In the example below, we are aiming for the relationship Application.ResponsibleUser. Sothe Row query returns Application objects:

    AQL: FI ND Appl i cat i on

    or SQL: SELECT app. REFSTR FROM APPLI CATI ON app

    The Column query returns Person objects:

    AQL: FI ND Person

    or SQL: SELECT usr . REFSTR FROM PERSON user

  • 7/25/2019 Reports Advanced Cookbook 7.1

    36/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 36

    alfabet AG

    Relationship Definit ion

    Now go to the tab Relationship Definition Select Simple Relationship and specify the singleforward reference that is the relationship you want users to be able to edit.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    37/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 37

    alfabet AG

    3.3 Editable Relationship Matrix via Relationship Class new in 7.1

    Creating a relationship matrix for an indi rect relation

    The creation process is the same as for the Editable Relationship Matrix for Reference /ReferenceArray.

    Relationship Definit ion

    In the tab Relationship Definition, select Complex Relationship. Specify the nature of thecomplex relationship by selecting the appropriate relationship class from the menu, and setthe Row and Column fields to the respective references from your Row and Column queries.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    38/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 38

    alfabet AG

    3.4 Editable Relationship Matrix for Business Supports

    Creating a matrix for business supports

    1. Create a new report

    2. Set Type= Custom3. Set Templ at e= ITMAP_TableReport

    4. Right click report and select Cr eat e Cust om Report Vi ew5. Right click report and select St ar t al f abet Repor t Assi st ant

    Rows and Columns Definit ion

    This works the same way as in the normal relationship matrix.

    Relationship Definit ion

    For the relationship definition, you are given a special screen tailored to the relationships ofbusiness supports.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    39/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 39

    alfabet AG

  • 7/25/2019 Reports Advanced Cookbook 7.1

    40/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 40

    alfabet AG

    4 Limitations of Native SQL Reports

    You can also use native SQL to write planningIT reports. Every single place that allows foran AQL query will also allow an SQL query (report, wizard post condition, certain xml objects,etc.).

    However, there are some things to keep in mind when writing native SQL queries. In case ofAQL, planningIT automatically takes care of some issues such as making the reportnavigatable, validating object mandates, etc. In native SQL, you have to put these features inmanually.

    4.1 REFSTR in SELECT

    The first argument in the SELECT should be a REFSTR. This tables objects will benavigatable in the finished report. In AQL this is done by defining one of the classes as the

    FIND class.

    Example:

    SELECT app. REFSTR, app. NAME, app. VERSI ONFROM APPLI CATI ON appORDER BY app. NAME, app. VERSI ON

    4.2 Examples for JOINS

    You can use different tables by joining them together. Like in AQL, you should always use

    the REFSTR for this.

    Example for JOIN (single reference)

    SELECT app. REFSTR, app. NAME, app. VERSI ON, usr . FI RSTNAME, usr . NAMEFROM APPLI CATI ON appI NNER J OI N PERSON usr ON ( app. RESPONSI BLEUSER = usr . REFSTR)ORDER BY app. NAME, app. VERSI ON

    Example for JOIN (reference array)

    SELECT app. REFSTR, app. NAME, app. VERSI ON, usr g. NAMEFROM APPLI CATI ON app

    I NNER J OI N RELATI ONS rel ON ( r el . FROMREF = app. REFSTR )I NNER J OI N USERGROUP usr g ON ( r el . TOREF = usr g. REFSTR )WHERE rel . PROPERTY = ' Responsi bl eUser Gr oups'ORDER BY app. NAME, app. VERSI ON

    4.3 Filters in SQL reports

    While planningIT will initially generate all necessary filters for AQL reports, in SQL reportsyou have to put in some manual work to make some filters work, e.g. combo boxes andchecked combo boxes. The showcase database contains example reports with these filterelements in combination with enumerations, XML objects and subqueries in

    * Technical Trainings Report Training II (Advanced) 5. Native SQL Reports

  • 7/25/2019 Reports Advanced Cookbook 7.1

    41/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 41

    alfabet AG

    Please note that you can prefix parameters with NSQL_. This will result in planningIT notperforming any safety checks on this parameter. This will allow you to use parameters fromwithin constructs like WI THor UNI ON. However, since there is no safety check, this alsoresults in error messaged being vague and automatically generated parameter fields("Create SQL Report View") having to be adjusted manually.new in 7.1

    In most cases, a normal parameter (without the prefix) will work fine.

    4.4 Cascading Filters new in 7.1

    One special case is cascading filters (with a dependency between different filter fields).

    Example: you wish to create two filters, and the user will go through two steps: first to selectsomething in the first filter; this will determine exactly which values the second filter shouldoffer for selection in the second step. Only afterwards, the Submit button is pressed.

    The first filterwill be defined as Master Control. On the master control filter,

    1. Set a Name(e.g. @USR_REF this reference will be used in the second filters query)

    2. Fill the Rangewith values using a method of your liking (from XML object, from SQL,from Enum...)

    3. Set Submi t = Tr ue(this will make the filter a Master Control

    The second filterwill be defined as depending on its master control:

    4. Set a Name(e.g. @APP_REF this reference will be used in the results query)

    5. Set SubType = Sql Enumand fill the Rangewith values using SQL (use a conditionto create a connection between this filter and its master control, e.g. WHERE = @USR_REF).

    6. Set Mast er Cont r ol sto include the master control name (e.g. USR_REF) so thisfield will be updated when its master control is updated

    7. Set Ref r esh on Submi t = t r ue

    The results querywill use the second filterto filter the result set down, but may also use thefirst filterin addition if you want the first filter to be applied to the result set automatically afterthe first step already.

    4.5 Data Translation

    In case one of your locales / culture settings supports the translation of data (such asapplication names and descriptions), you may want to display both the contents in the defaultlanguage and the second language.

    Example:

    SELECTdom. REFSTR,dom. LEVELI D,

  • 7/25/2019 Reports Advanced Cookbook 7.1

    42/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 42

    alfabet AG

    dom. NAME AS "Domai n. Name_en" ,dom. DESCRI PTI ON AS "Domai n. Descr i pt i on_en",dom. NAME_1031 AS " Domai n. Name_de" ,dom. DESCRI PTI ON_1031 AS "Domai n. Descr i pt i on_de"

    FROM DOMAI N domWHERE ( dom. LEVELI D I S NOT NULL AND dom. NAME_1031 I S NOT NULL )

    ORDER BY dom. LEVELI DNUM, dom. NAME

    4.6 Evaluating Mandates

    In AQL queries, the mandate mask is automatically (by design) applied to all objects of theFIND class, but not to any objects on joined classes. In SQL reports you have the freedom ofapplying the mandate mask manually to any table you wish.

    By default, mandates are NOT evaluated in SQL queries.

    Example:

    SELECTapp. REFSTR,usr . FI RSTNAME + ' ' + usr . NAME AS ' You ar e: ' ,app. NAME + ' ' + app. VERSI ON AS ' You have access t o t hese appl i cat i on

    obj ect s : 'FROM APPLI CATI ON app, PERSON usrWHERE

    usr . REFSTR = @CURRENT_USERAND ( bi t and( app. MANDATEMASK, usr . MANDATEMASK) 0)

    4.7 Using Instruct ions in Native SQL Reports

    If you would like to use instructions in an SQL based report to create a grouped report, thereis some preparation needed.

    The instructions were created to work with AQL / the PlanningIT meta-model so in order forsome of them to work, you have to change your SQL query to look like AQL to planningIT.

    Use column aliases to rename your columns to resemble properties from the planningITmeta-model:

    SELECTNULL,

    dom_0. REFSTR AS "Domai n_0. REFSTR" ,dom_0. NAME AS "Domai n_0. Name" ,dom_1. REFSTR AS "Domai n_1. REFSTR" ,dom_1. NAME AS "Domai n_1. Name"

    FROM DOMAI N dom_0, DOMAI N dom_1WHERE dom_1. BELONGSTO = dom_0. REFSTRGROUP BY dom_0. REFSTR, dom_0. NAME, dom_1. REFSTR, dom_1. NAME

    Only then, the GROUPBY_ EXinstruction will work correctly:

    Gr oupBy_Ex( "Domai n_0. REFSTR" , "Domai n_1. REFSTR" , "Domai n_0", 0) ;RemoveCol umns( "Domai n_0. REFSTR, Domai n_1. REFSTR") ;

    But youre not stuck with the meta-model name for that property / column. Afterwards, you

    can set the name to be displayed on the column header by using the SETCOLUMNSHOWNAMEinstruction.

  • 7/25/2019 Reports Advanced Cookbook 7.1

    43/43

    alfabet Custom Reports 7.1 - Advanced Reporting - Cookbook 43

    Set Col umnShowName( "Domai n_0. Name", "Domai n") ;Set Col umnShowName( "Domai n_1. Name", "Sub Domai n") ;

    Use the instruction SetColumnFormat to change number or date formats.

    Examples:

    SetCol umnFor mat( "Appl i cat i on. St art Date", "yyyy- MM- dd" ) ;Set Col umnFor mat ( "I ndi cat or . Val ue", "0. 00") ;