Quantcast
Channel: Reports & Macros
Viewing all 1125 articles
Browse latest View live

Page Break when MS Word Table Row goes next page

$
0
0

Hi,

I have developed a table with large number of rows inside for loop and want to write a page break when table row goes next page. 
Let me know is there any right place to write this code.
outputObj.OutputField(Constants.FIELD_NEWPAGE,"Univers 45 Light",11,Constants.C_BLACK,Constants.C_BLACK, Constants.FMT_LEFT)
 

Thanks,

Rupam


Reference error: "determinemode" is not defined

$
0
0

Good morning,

I want execute the macro ARCMExport-ExecuteSemanticReports.amx and then i watch the next errror:

can you help me with this?

thank you so much.

Best regards,

Freeze column/row in EPC(table display) model

$
0
0

Hi,

Is it possible to freeze column/s in EPC(table display) model in report scripting?

Thanks a lot.

outputing an excel in a matrix-like style, how to solve Range error?

$
0
0

Hello, I am having some trouble making an excel with this output (matrix-like)  => image will be below.

The yellow part is the part that I am trying to write automatically. 

I can write if I use with a single tablecell function, but If i try to to write and create all the cells automatically (with for cycles) it gives me this error:

 

  1. My code until now:
    
    var activeDB;
    var selectedLanguage = Context.getSelectedLanguage();
    var dummyOutput = Context.createOutputObject();
    var foldersList = new java.util.Vector();
    
    main();
    dummyOutput.WriteReport();
    
    function main() {
    
        activeDB = ArisData.getActiveDatabase();
    
        foldersList = ArisData.getActiveDatabase().GroupList(ArisData.getSelectedGroups()[0]);
        dummyOutput.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT | Constants.FMT_REPEAT_HEADER, 0);
        dummyOutput.TableRow();
        dummyOutput.TableRow();
        dummyOutput.TableCell("PROJECTO JUMP", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("NOTA: Os subprocessos na coluna D são inputs e outputs dos subprocessos na linha 3", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableRow();
        dummyOutput.TableCell("imagens", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("imagens", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("imagens", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("imagens", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
        for (var i = 0; i < foldersList.length; i++) {
            var currentFolder = foldersList[i];
            var currentFolderName = currentFolder.Name(selectedLanguage);
            var folderParent = currentFolder.Parent();
            var folderParentName = folderParent.Name(selectedLanguage)
            var folderParentChildList = folderParent.Childs(false);
            for (var j = 0; j < folderParentChildList.length; j++) {
                var currentChild = folderParentChildList[j];
                var folderParentGrandChild = currentChild.Childs(false);
                for (var h = 0; h < folderParentGrandChild.length; h++) {
                    var currentGrandChild = folderParentGrandChild[h];
                    var grandGrandChildList = currentGrandChild.Childs(false);
    
                    if (folderParentName == "5. Gestão de ativos") {
                        dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                        if (folderParentName == "6. Gestão de Energia") {
                            dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                            if (folderParentName == "7. Gestão Comercial") {
                                dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                if (folderParentName == "8. Gestão e Operação de Rede de Distribuição") {
                                    dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                    if (folderParentName == "10. Service Provider") {
                                        dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                    }
                                }
                            }
                        }
                    }
                }
            }
    
        }
    
        dummyOutput.TableRow();
        dummyOutput.TableCell("Capacidade", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("Grupo de Processo", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("Processo", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        dummyOutput.TableCell("Sub-Processo", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
        dummyOutput.TableCell("TO WRITE HERE ", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
        writeColumns(foldersList);
    
        //antes de fechar a funcao main
        dummyOutput.EndTable("FIM", 100, "Arial", 10, Constants.C_BLACK, Constants.C_BLACK, 0, Constants.FMT_LEFT | Constants.FMT_ITALIC, 0);
    
    }
    
    /*
     * Writes in the columns "Capacidade, Grupo de Processo, Processo e Sub-Processo"
     */
    function writeColumns(foldersList) {
    
        for (var i = 0; i < foldersList.length; i++) {
            var currentFolder = foldersList[i];
            var currentFolderName = currentFolder.Name(selectedLanguage);
            var folderParent = currentFolder.Parent();
            var folderParentName = folderParent.Name(selectedLanguage);
            var folderParentChildList = folderParent.Childs(false); //false é sem recursividade, ou seja, apenas os childs do nivel abaixo
            for (var j = 0; j < folderParentChildList.length; j++) {
                var currentChild = folderParentChildList[j];
                var folderParentGrandChild = currentChild.Childs(false);
                for (var h = 0; h < folderParentGrandChild.length; h++) {
                    var currentGrandChild = folderParentGrandChild[h];
                    var grandGrandChildList = currentGrandChild.Childs(false);
                    for (var k = 0; k < grandGrandChildList.length; k++) {
                        var currentGrandGrandChild = grandGrandChildList[k];
                        if (folderParentName == "5. Gestão de ativos") {
                            dummyOutput.TableRow();
                            dummyOutput.TableCell(folderParentName, 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                            dummyOutput.TableCell(currentChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                            dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                            dummyOutput.TableCell(currentGrandGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
                            if (folderParentName == "6. Gestão de Energia") {
                                dummyOutput.TableRow();
                                dummyOutput.TableCell(folderParentName, 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                dummyOutput.TableCell(currentChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
                                if (folderParentName == "7. Gestão Comercial") {
                                    dummyOutput.TableRow();
                                    dummyOutput.TableCell(folderParentName, 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                    dummyOutput.TableCell(currentChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                    dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
                                    if (folderParentName == "8. Gestão e Operação de Rede de Distribuição") {
                                        dummyOutput.TableRow();
                                        dummyOutput.TableCell(folderParentName, 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                        dummyOutput.TableCell(currentChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                        dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
                                        if (folderParentName == "10. Service Provider") {
                                            dummyOutput.TableRow();
                                            dummyOutput.TableCell(folderParentName, 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                            dummyOutput.TableCell(currentChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                                            dummyOutput.TableCell(currentGrandChild.Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
    
                                        }
                                    }
                                }
                            }
                        }
                    }
    
                }
            }
        }
    }

Adding SLA Metrics to Process Manual Reports

$
0
0

REPOST from the ARIS Cloud Forum:

We are using ARIS Cloud Advanced and we would like to be able to have process metrics appear in the "Create Process Manual" report.  Each process has various KPIs including task durations (min, max, average).  Overall processes also are associated with Service Level Agreements (SLAs) that define process duration "standards".  We are not sure how best to provide relationships to these metrics such that the information appears in the process manuals (i.e., the standard "Create Process Manual" report).  Any Function-to-KPI relationships we created do not seem to appear in the reports.  We are interested to know what solutions others have used or developed for reporting these relationships.

Note that we considered modifying the "Create Process Manual" report script but it is quite complex and we are relatively new to ARIS.

We also understand that there are other ARIS applications that may use such metrics attributes (e.g., ARIS Simulation), so we do not want to create any work-arounds that might interfere with these functions if we add these applications later.

Any practical advice would be greatly appreciated.

GC overhead limit exceeded - Error While Running Report

$
0
0

Hello, I got this error while running a report in my ARIS Architect local version. What Should I do?

Selected lane in Macros/Reports

Formatting Text in Report Forms

$
0
0

Hi,

Is it possible to change the font properties (text color, bold, size...) in the form reports ?

I see it is possible to apply html format in a DialogTemplate text:

var userDialog = Dialogs.createNewDialogTemplate (1000, 430, "Title");
userDialog.Text (560, 35, 100, 15, "<b>Table: </b>");
userDialog.Text (560, 35, 100, 15, "<font color=\"red\">Table: </font>");

but I can't find the way to do the same or similar for list items (tables, DropListBox...), I have this code:

var userDialog = Dialogs.createNewDialogTemplate (1000, 430, "Title");
userDialog.Table (560, 55, 435, 340, ["Column 1", "Column 2"], [Constants.TABLECOLUMN_SINGLELINE, Constants.TABLECOLUMN_SINGLELINE], [40, 60] , "TBL_ID1", Constants.TABLE_STYLE_DEFAULT);

// putting the content in the table
var tblContent = [["foo1", "foo2"], ["foo10", "foo11"]];
this.dialog.getPage(0).getDialogElement("TBL_ID1").setItems( tblContent );

 

Any ideas ¿?

 

Many thanks.


Strange behavior/BUG in a "Report class CxnDef - Method Delete"

$
0
0

Hi,

Im seeing a strange behavior in the function "Delete (boolean bCheckForOccs)" on a CxnDef in a Report.

I have this code:

cxn = CxnExistenteEntre2Obj(objDef, objDef2, Constants.CT_SENDS_2, Constants.EDGES_OUT);

if (cxn.Delete(false)) {
// Deleted
} else {
// Not Deleted
}

function CxnExistenteEntre2Obj (objDefSource, objDefTarget, conexion, tipoConexion) {
    var conexionFinal = false;
    var listaConexiones = objDefSource.CxnListFilter(tipoConexion, conexion);

    for (var i = 0; i < listaConexiones.length; i++) {
        if (listaConexiones[i].TargetObjDef().IsEqual(objDefTarget)) {
            conexionFinal = listaConexiones[i];
            break;
        }
    }

    return conexionFinal;
}

Info:

If I start the Form Report and try to delete the Cxn with an open ocurrence the Delete() return false. This is OK, but when I delete successfully a Cxn without open occs and next I try to delete a Cxn with an open occ, instead of returning false returns true.

I doubt it is a bug, but I don't understand this behavior.

The CxnDef is the correct, and the same, I try to delete the cache too (Database.clearCaches()) and nothing...

 

Any Ideas ¿?

 

Many Thanks.

Datum aus Excel in ein Benutzerattribut vom Typ Datum einlesen

$
0
0

Hallo Zusammen,

wie kann ich aus einer Zelle von Excel ein Datum (z.B. 01.01.2016  00:00:00) in ein Benutzerattribut vom Datentyp Datum importieren?

Mit getCellValue() funktioniert es leider nicht.

 

Schon mal Danke im Voraus

ARIS 9.8.2 SCRIPT TO DELETE USERS FROM UMC

$
0
0

Hi,

every week I need to delete some users from UM and I want to do this with a script.

The support tell me to use the  y-tenantmgmt.bat that is located in the

"C:\SoftwareAG\ARIS9.8\server\bin\work\work_umcadmin_?\tools\bin\" folder

with this options: deleteUser -au <userToBeDeleted> -u superuser -p <superuser password>

Someone knows if there is a way to do this directly with an ARIS script ?

Thanks!!

 

Marco

Scheduled report don't start

$
0
0

Hello,

I want to schedule a new report in ARIS 9.6, but it don't start nothing is happening.

I have an other scheduled report which is running perfect since severals month.

 

Can you help me, in which log file can I check to find any information ?

Many thanks by advance.

Regards.

 

Word report - Getting description of a connection

$
0
0

I'm having a model with objects connected to each other.

Some of the connections have filled in the Description/Definition attribute.

But how do i get this Description/Definition of the connection in my word report (prochandbook)?

Is this even possible?

This is my table in word so far:

NumObj, AT_NAME | Objects,14,AT_NAME,<output> | Objects,14,AT_NAME,<input> | Here i want the Description(s) of the connections

Report to Export groups, models and objects in XML

$
0
0

I want to make a report that gives the same result as the ARIS functionality of exporting a model or group as an xml file, and allows to import that xml file in another database.

 

I am trying to make this report but I can't get the file to appear on my computer. This is the code I am using to make the xml export:

 var selectedG = ArisData.getSelectedGroups();
    var xmlExport = Context.getComponent("XMLExport");  
    var options = xmlExport.createDefaultXMLExportOptions(selectedG[0], [g_nloc] );
    options.setZipExport(false);  // No compression
    options.setHierarchyDepth(0); // Assignment level
    options.setRelationDepth(0);  // Connection level
    options.setIsSimpleExport(false); // Minimum export off
    options.setExportUsersAndUsergroups(false); // Users and Usergroups off
    options.setExportCompleteGroupPaths(true); // Complete paths off
    var result = xmlExport.startExport(options);
    var myResult = result.getFileResult();

 

no file is opened when i run the script, i created the script so it would have output xml and I cant seem to find the problem here

How to extract the messages of the "BPExportResult.getMsgs()" ?

$
0
0

Hi,

I'm making a report to refresh every day a DB in the Business Publisher Server.

It works fine but I can't find the way to read the messages of the result.

Short Code:

publisher = Context.getComponent("BusinessPublisher");
readonlyDB = ArisData.openDatabase(BD_NAME, true);

infoUpdate = publisher.updateExport(readonlyDB, PUBLISHER_SERVER, EXPORTATION_BD_NAME);

var foo = infoUpdate.getMsgs();

 

The problem is the result of "getMsgs()" (Collection <Message>) in the "Report class BPExportResult"

foo.get(0) // Output: com.aris.modeling.common.core.progress.Message@7a88b227
foo.get(1) // Output: com.aris.modeling.common.core.progress.Message@475dd97f
foo.get(2) // Output: com.aris.modeling.common.core.progress.Message@2ba43e2c

How can I read this messages ? :S

 

Many Thanks.


Recursive call to find 'superior' object

$
0
0

I have been trying to write a script to find the process-oriented superior of objects.

Initially I thought this would not be very difficult, though I am unable to find a good solution.

I am looping through all Object Occurrences, then I get a connection list for each object:

aCnxDefList = aObjOcc[j].ObjDef().CxnList(); // CxnDef[]

, then I loop through connections comparing names of the known top level superiors with all aCnxDefList[k].SourceObjDef().Name(nLocale). If I don;t get a match, then I call a recursive function:

nCurrentLevel = get_nesting_level(aCnxDefList[k].SourceObjDef(), 0);

I am using a recursive function, but I am unable to walk up to the superior for some reason.I would appreciate any suggestions. Here is the code for the function:

// Takes in Source Object Def
function get_nesting_level(my_ObjDef, myLevelCount) {
    aCxnDef = my_ObjDef.CxnList(Constants.EDGES_IN);
    myLevelCount++; // increment new nesting level
    
    // cycle through 'Connections IN' to find superior connection match for "CORE", "MANAGEMENT", "ENABLING"
    for (var i=0; i < aCxnDef.length; i++) {
        curSrc_ObjDef = aCxnDef[i].SourceObjDef();
        sObjName = aCxnDef[i].SourceObjDef().Name(nLocale);
        
            // All objects are children of the following 3 objects
            if((sObjName == 'X') ||
                (sObjName == 'Y') ||
                (sObjName == 'Z'))
                {
                // we found the matching top level!!!
                return (myLevelCount);
                }
                else
                {
                // we did not find the superior yet - recurse another level
                return get_nesting_level(curSrc_ObjDef, myLevelCount);
                }
    }
}

Escape user dialog

$
0
0

Hallo all together,

my problem is the escape from a user dialog in a report.

I've created a dialog window in my report similar to the example on the help side "Report class DialogObject". I've adapted it to my report as a single side dialog and it works, excepted one feature. I can click "OK" and the dialog ends and I can click "Escape" and it also ends.

But how can I read in my report, which button has finalized the dialog?

Therefore I could'nt find any notes in the help side.

I wold be happy if is somebody who can help me.

Many thanks.

How to insert attached document in an output document ?

$
0
0

Hi,

I have a report that output information of objects in a .doc or .pdf.

The problem is when the attribute "Documentation" of the object had attached a document, I can't find the way to insert it (attached with icon, not its contents) in the table.

(Attached sample image in MS Office Word, and if you open the icon open the document attached)

Any help ?

Actually If the atribute "Documentation" had an image attached I print it but if had other documents does nothing.

 

Short Code:

output = Context.createOutputObject();

var document = objDef.Attribute(Constants.AT_DOCUMENTATION, LANGUAGE).getExternalDocument();

if (document.isValid()) {
    if ( document.getFileExtension().search(/jpg|jpeg|png|gif|emf|tif|tiff/i) != -1 ) {

         var img = Context.createPicture(document.getDocument(), Constants.IMAGE_FORMAT_PNG);
         output.OutGraphic(img, -1, imgWidth, imgHeigth);

   } else {
          // Insert document as an icon ¿?
   }
}

 

Many Thanks.

Model Template not rendering during HTML Export

$
0
0

Dear All

Does anyone know if ARIS 98 supports the HTML Export of a custom Template?  Our scenario is that we have developed a Template which has been applied to all models.  When the standard HTML export report is executed, the design elements of the template ( for example background color, line weight) do not transition to the HTML export.  Modifying the HTML files, CCS, JS, isn't a viable option, ie I don't want to maintain html tags such as body bgcolor etc every time an HTML Export is generated.  Fragments do render.

Any insight is appreciated.

Best Regards,

John

File attachments: 

Ho to sort values of multi-value attribute

$
0
0

Is it possible to sort the value list of a multi-value attribute in the same order as one can see in attribute configuration?

For example: I have defined an attribute with 3 values:

  • Cat
  • Dog
  • Horse

and this is the order that a any user will see in the  combo-box when he will assign a value for the attribute (of a model, an object,...).

Since it is possibile to change the predefined order, I need to know the current one. But in ArisMetaModel class I didn't find any method to do it.

Does anyone know if it is possible and how to?

Maggiù P.

Viewing all 1125 articles
Browse latest View live