User Level
Business Administrator
User LevelBusiness Administrator SyntaxThe command uses this syntax.
Add WebreportTo define a webreport from within MQL use the add webreport command. Syntax
Appliesto ClauseInclude this clause to indicate if the webreport collects statistics on business objects, relationships, or both. The default is business object. For example:
The ability to report on relationships as well as or instead of business objects is applicable only when SEARCHCRITERIA is an expand. (When SEARCHCRITERIA is not an expand, no relationships are returned, so there are none to evaluate against.) In an expand, the information desired could be some summary of data from the relationships found and not the end objects. Or it could be you need more than one statistic and that one is properly obtained from the objects and the other from the relationships. In addition to an overall
Searchcriteria Clause
An “expand” searchcriteria does not make sure that returned objects are unique. That is, any objects that are connected more than once to the object(s) being expanded (or recursed to) will be listed more than once. This affects webreports, eval expression, and other commands using searchcriteria. For example, the following might return a list containing duplicate entries: MQL<18>eval expres "count TRUE" on ( expand bus t2 t2-1 0 );
To avoid the duplication, you could change the searchcriteria to the following: temp query * * * over expand bus t2 t2-1 0 SEARCHCRITERIAs can be linked with binary operators, which follow simple, intuitive rules:
If there is more than one binary operator in a
( set A + set B ) - set C would probably evaluate differently than: set A + ( set B - set C ) Notes ClauseThis clause is used to store a string of any length. It is designed for use by applications to store any information they need to maintain with the webreport. (Of course, properties could be used, but they are limited to no more than 255 characters.) For example, the Business Metrics application stores data in the notes field that is required to update the JSP page used to create a webreport with values used to evaluate the webreport. Reporttype ClauseThis clause can be used to store a string up to 255 characters. Notcheckaccess ClauseThis clause indicates if show and read access should be checked when the webreport is evaluated; that is, when the data expressions are evaluated. There are two reasons you might want to turn off these accesses:
The default is that read and show access are checked (for show, that’s assuming show access is on). This option does not control what happens when the business objects or connections found by a webreport result are printed, which can be done with options in “evaluate webreport” and “temp webreport”, as well as through a Select clause in “print webreport”. In that case, show and read access will apply as they normally do regardless of this setting. Groupby ClauseThis clause is used to define a hierarchy of the data in the results of a webreport. A groupby has one expression, which is either a string or a pointer to an expression object. A webreport can have any number of groupbys. The expression used with groupby should be an expression that applies to a single business object or connectio . All of the groupby expressions will be evaluated against each object found by the search criteria. The values of these evaluated expressions will be used to organize the objects into a number of subsets. There will be one subset for each unique combination of groupby values after evaluating them all across all the objects. For example, suppose the attribute Priority can take on values 0,1,2,3 and the attribute Material can take on values Metal, Wood, Rubber, Plastic, Other. Then, if the webreport includes these groupby expressions:
The expression could result in as many as 20 distinct subsets, corresponding to the 20 unique combinations of (Priority, Material), and it would report the average Cost of Rework for the objects in each of those ~20 subsets. The term 'cell' is used to refer to these subsets in the webreport selectables described below. The
The objects returned by the search criteria are grouped by the values of the first groupby expression, then sub-grouped by values of the second groupby expression, and so on to separate the objects into their appropriate cells. Each groupby can have a label associated with it, and the labels need not be unique. The groupby syntax is one of:
For example:
Data ClauseThis clause has the same syntax as the Groupby clause:
However, the expressions used with data clauses are those appropriate for evaluation on a collection of business objects or connections (called “collection expressions”), such as averages, sums, standard deviations, and so on. For more information, see expression CommandEach data clause has one expression, which is either a string or a pointer to an expression object. A webreport can be defined with any number of data clauses. Each data expression is evaluated against each of the subsets determined by the search criteria together with the groupbys. To evaluate the data expressions against combinations of these subsets, such as the entire collection or with some groupby ignored, summaries should be created. For more information, see Summary Clause. For example:
Summary ClauseA webreport can include a list of uniquely named summaries. A summary specifies a subset of the datas and groupbys of the webreport, which allows you to collapse groupings and report on only a subset of the datas. Use the
For example, using the example above with groupbys on Priority and Material, you could specify a Summary report with ignores the Material groupby to report the average Cost of Rework by sorting by Priority alone:
The 1’s refer to the first groupby and first data expressions defined for this webreport. Copy WebreportIf you are a Business Administrator with person access, you can copy webreports in any person’s workspace (likewise for groups and roles). Other users can copy visible webreports to their own workspaces. After a webreport is defined, you can clone the definition with the Copy Webreport command. Cloning a webreport definition requires Business Administrator privileges, except that you can copy a webreport definition to your own context from a group, role or association in which you are defined. This command lets you duplicate webreport definitions with the option to change the value of clause arguments:
Modify WebreportIf you are a Business Administrator with person access, you can modify webreports in any person’s workspace (likewise for groups and roles). Other users can modify only their own workspace webreports You must be a business administrator to modify a webreport owned by a group or role. Use the Modify webreport command to add or remove defining clauses and change the value of clause arguments:
Each modification clause is related to the arguments that define the webreport. To change the value of one of the defining clauses or add a new one, use the Modify clause that corresponds to the desired change. Evaluate WebreportUse the evaluate webreport command in MQL to generate results: Syntax
No Count ClauseBy default, a count of the objects that meet the search criteria is included when the webreport is evaluated. Include no count to remove it from the webreport’s results. [No] Data ClauseInclude the Data clause in the evaluate webreport command to include only the results of the webreports datas specified with INDEX. Include no data to remove all datas from the webreport’s results. [No] Summary ClauseInclude the Summary clause in the evaluate webreport command to include only the webreport summary specified with NAME. Include no summary to remove all summaries from the webreport’s results. Objects ClauseInclude the Objects clause in the evaluate webreport command to return the list of business object ids that meet the search criteria, in addition to the webreport results. Include Select clauses in brackets to return this information about the objects found. Save ClauseInclude the Save clause to save the results in the database. You can include any of the archive subclauses, including label, description, archive, and objects. If save is issued without archive, the results are saved as “the result.” If you use archive, the computed results are stored as an archive, rather than as the result. The difference between the result and an archive is in how you read or manipulate them. You can also lock or unlock the results. When the result is locked it cannot be overwritten without unlocking it. XML ClauseInclude the xml clause so that the output is formatted as xml. Separator ClauseInclude the Separator clause to specify how fields are separated in the results. The separator is used to separate a list of groupby values from the count and data values in a given line of output. Groupbyseparator ClauseInclude the Groubyseparator clause to specify how groupby output is separated in the webreport results. The groupby separator is used to separate groupby values. Temporary WebreportYou can use the temp webreport command to define and evaluate webreport in one step.
The
Delete WebreportIf you are a Business Administrator with person access, you can delete webreports in any person’s workspace (likewise for groups and roles). Other users can delete only their own workspace webreports. You must be a business administrator with group or role access to delete a webreport owned by a group or role. If a webreport is no longer required, you can delete it using the delete webreport command
This command searches the list of defined webreports. If the name is found, that webreport is deleted. If the name is not found, an error message is displayed. For example, to delete the webreport named “ProjectStatus” enter the following:
After this command is processed, the webreport is deleted and you receive an MQL prompt for another command. |