AG

Dear community,
I spent a lot of time today, but I could not achieve a result. How do I create a table like this? More precisely - how to make cell number 5 correctly?

Below is my code, but it only works until I add the 5th column and the 5th cell to it (it forms a table like in Picture 2). I have experienced many options, but I don't understand how to do it correctly :(

They only get this result.

I ask for your advice.

 

var oO = Context.createOutputObject();
var colWidthList = new java.util.ArrayList();
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    
    oO.BeginTable(100,colWidthList,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
        oO.TableRow();
            oO.TableCell("Col 1",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Col 2",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Col 3",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Col 4",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Входящие 5",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);

        oO.TableRow();
            oO.TableCell("Cell 1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
            oO.TableCell("Cell 2",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 31",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 41",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 32",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 42",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 33",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);  
                    oO.TableCell("Cell 43 ",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                    oO.TableCell("Cell 34",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
                   oO.TableCell("Cell 44",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
           oO.TableCell("Cell 5",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);


 oO.WriteReport();
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Thu, 06/02/2022 - 15:41

Hi,

you have to add multiple rows.

Row1: Header row

Row 2: Row for cell 1 (size 4,1), cell 2 (size 4,1),  cell 3 (size 1,1),  cell 4 (size 1,1),  cell 5 (size 4,1)

Row3: Row for cell 3 (size 1,1),  cell 4 (size 1,1),

Row4: Row for cell 3 (size 1,1),  cell 4 (size 1,1),

Row5: Row for cell 3 (size 1,1),  cell 4 (size 1,1),

BR Robert

0
by Anton Golovanov Author
Posted on Fri, 06/03/2022 - 08:16

In reply to by rgoldenbaum

Dear Robert,
thank you so much for your reply! I finally started to understand the logic of combining cells in ARIS. I tried to reproduce your version. And I almost got it right! But - "almost" :(

The cell in the fifth column stretches only three rows. Maybe I wrote something wrong in the code again?



var oO = Context.createOutputObject();
var colWidthList = new java.util.ArrayList();
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    colWidthList.add(12);
    oO.BeginTable(100,colWidthList,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
        oO.TableRow(); //row 1
            oO.TableCell("Header 1",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Header 2",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Header 3",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Header 4",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
            oO.TableCell("Header 5",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
       oO.TableRow(); //row 2
            oO.TableCell("Cell 1-1 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);            
            oO.TableCell("Cell 1-2 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);            
            oO.TableCell("Cell 1-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
            oO.TableCell("Cell 1-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
            oO.TableCell("Cell 1-5 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
        oO.TableRow(); //row 3            
            oO.TableCell("Cell 2-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
            oO.TableCell("Cell 2-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
        oO.TableRow(); //row 4  
            oO.TableCell("Cell 3-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
            oO.TableCell("Cell 3-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);       
         oO.TableRow(); //row 5          
            oO.TableCell("Cell 4-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);  
            oO.TableCell("Cell 4-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);  
 oO.WriteReport();
0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Fri, 06/03/2022 - 09:58

Hm yes, this could be a bug...  if you add another row with a single column in it (or multiple as well), it looks good. Try this:

var oO = Context.createOutputObject();
var colWidthList = new java.util.ArrayList();
colWidthList.add(12);
colWidthList.add(12);
colWidthList.add(12);
colWidthList.add(12);
colWidthList.add(12);
oO.BeginTable(100,colWidthList,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableRow(); //row 1
oO.TableCell("Header 1",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableCell("Header 2",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableCell("Header 3",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableCell("Header 4",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableCell("Header 5",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0);
oO.TableRow(); //row 2
oO.TableCell("Cell 1-1 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 1-2 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 1-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 1-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 1-5 size 4,1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableRow(); //row 3
oO.TableCell("Cell 2-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 2-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableRow(); //row 4
oO.TableCell("Cell 3-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 3-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableRow(); //row 5
oO.TableCell("Cell 4-3 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableCell("Cell 4-4 size 1,1",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.TableRow(); //row 5
oO.TableCell("",1,5,"Times New Roman",0,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0);
oO.WriteReport();
 

0
by Anton Golovanov Author
Posted on Fri, 06/03/2022 - 10:01

Yes, you are absolutely right! I just wanted to write about this: adding another line solves the problem. Now everything is fine! Robert, thank you very much!

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock