ARIS report- Is there any report that will show only selected attributes?

Translate this pagebookmark or share this page
Ajay's picture

Posted: 2012-05-18
1080 views | 3 comments | category: ARIS Community

0
show all articles

Is there any report that will show only selected attributes like i want to show only Identifier & Discription. If not can i edit 'Open excel table in process generator' macro for that ?

The reason of doing this is that i want a report that shows the flow sequentially top to bottom. Pls suggest

Comments
Srinivas's picture

Hi Ajay,

Please check the below script, it will display the attributes of an object, If you want to display the attributes of a model then change oObject to oModel.

 

var nLocale=Context.getSelectedLanguage();
function main(){
// creates an output object
var oOutput=Context.createOutputObject();
//Begining of a table
oOutput.BeginTable(100,Constants.C_DARK_BLUE, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.TableRow();
oOutput.TableCell("Object Name",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Identifier",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Description",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);

var models=ArisData.getSelectedModels();
for(var i=0;i<models.length;i++){
    var oModel=models[i];
    var objects=oModel.ObjDefList();
    for(var j=0;j<objects.length;j++){
        var oObject=objects[j];
        var sobjectName = oObject.Name(nLocale);
        var sobjectID = getAttributeValue(oObject,Constants.AT_ID);
        var sobjectDesc = getAttributeValue(oObject,Constants.AT_DESC);
        oOutput.TableRow();
        oOutput.TableCell(sobjectName,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); 
        oOutput.TableCell(sobjectID,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);  
        oOutput.TableCell(sobjectDesc,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
    }
}
oOutput.EndTable("",100,"Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.WriteReport();
function getAttributeValue(oItem,nAttrType){
    var oAttr=oItem.Attribute(nAttrType,nLocale);
    var sAttrValue=oAttr.getValue();
return sAttrValue;
}
}
main();

 

BR/Srinivas.

Sebastian's picture

Another is the WYSIWYG report editor. It should be easy to iterate a list of models/objects and output just those attributes you need. In the help section of ARIS Community, you find several tutorials on using the WYSIWYG editor.

Ajay's picture

Thanks Sabastian i will refer that.