Hi every body i want to create a new report & i hope to help me thats report give me a multi table like thats :
- 1st Table contains DataBase and user and all information about my database informations
- 2nd Table contains all model Name and Type(Value added chain,OC,...) And Description
- 3rd Table Contains all Objects Name and Type (Function,Event .....) and Description
- 4th Table Contains The Graph of My Project (Process Chart or Diagram )
=== Finaly i hope to add Header and Footer with my logo
===and help me to modify my table to add new attribute
regards.
Hi,
check out the ARIS scripting tutorials, here you can find the answer of the most of your questions:-).
Regards,
Eva
thanks Ms. Eva Klein but i am checking it before and i am try to create it and i am faild on it
if u can help more
this my code >>>>
var oOutput = Context.createOutputObject(); // Output object var nLocale = Context.getSelectedLanguage(); // Selected database language //===============logo====== //========================= //=======Information Table=================================================================== oOutput.OutputLn("Report Test", "Arial", 40, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0); oOutput.OutputLn("Jordan Islamic Bank", "Arial", 20, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0); //=============================================================================== //Build Table //ROW +++++ Header Of Table oOutput.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0); oOutput.TableRow(); oOutput.TableCell("Model name", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell("Object name", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell("Id", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell("Description", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); //================================================= oOutput.TableCell("New", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell("Object Type", 15, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0); var aModels = ArisData.getSelectedModels(); // Array of selected models for (var i = 0; i < aModels.length; i++) { var oModel = aModels[i]; // Current model var sModelName = oModel.Name(nLocale); // Name of current model var sModelID = getAttributeValue(oModel, Constants.AT_ID); // ID of current model var sModelDesc = getAttributeValue(oModel, Constants.AT_DESC); // Description of current model oOutput.TableRow(); oOutput.TableCell(sModelName, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell("", 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sModelID, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sModelDesc, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); //====================== oOutput.TableCell(sModelDesc, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sModelDesc, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); //========================= var aObjDefs = oModel.ObjDefList(); // All object definitions that have occurrences in the model for (var j = 0; j < aObjDefs.length; j++) { var oObjDef = aObjDefs[j]; // Current object definition var sObjName = oObjDef.Name(nLocale); // Name of current object var sObjID = getAttributeValue(oObjDef, Constants.AT_ID); // ID of current object var sObjDesc = getAttributeValue(oObjDef, Constants.AT_DESC); // Description of current object // var sObjtype = getAttributeValue(oObjDef, Constants.AT_DESC); oOutput.TableRow(); oOutput.TableCell("", 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sObjName, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sObjID, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sObjDesc, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); //==================== oOutput.TableCell(sObjDesc, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); oOutput.TableCell(sObjDesc, 15, "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); // Attribute with the specified type number in the specified language var sAttrValue = oAttr.getValue(); // Content of the attribute return sAttrValue; }
To add a new attribute for example the name of the model type you have to call the method "Type()":
var sModelType = oModel.Type();
The method returns you the model name as a string. Then you must only fill in the cell of your table with the new information:
oOutput.TableCell(sModelType, 15, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
I hope this helps you:-)
Hi Eva Klein.
Thank you for your help.
I want to ask you about how to getattibutevalue or constant of "remark and example"
I have all other attribute name
var sObjID = getAttributeValue(ocurrentobjdef1, Constants.AT_ID); ID of current object var sObjDesc = getAttributeValue(ocurrentobjdef1, Constants.AT_DESC); var sObjCreator = getAttributeValue(ocurrentobjdef1, Constants.AT_CREATOR); var sObjLast_Change = getAttributeValue(ocurrentobjdef1, Constants.AT_LAST_CHNG_2);