MA

 

       I want to know how can I start some content from new page in report. For example, I have description of one model in DOC , after this model I have description of second model that should start not in the same page, but from new page and so on.

by Vladimir Bis
Posted on Thu, 03/22/2012 - 16:32

Hi Misha,

I use BeginSection method.

0
by Misha Akopov Author
Posted on Fri, 03/23/2012 - 13:16

Mr. Vladimir Bis

 

Thank you again :) I didn't know about the function .

0
by Amol Patil
Posted on Sat, 03/24/2012 - 15:24

Hi Misha,

Use OutputObject.OutputField() method with Constants.FIELD_NEWPAGE as first parameter. Check out the help of this method for more detail.

Thanks,

Amol Patil

 

 

0
by Vladimir Bis
Posted on Mon, 03/26/2012 - 09:29

Hi Amol,

would you be so kind to write some short example? (example from help doesn't work)

0
by Amol Patil
Posted on Mon, 03/26/2012 - 15:32

HI Vladimir,

Sure

var l_OutputObj = Context.createOutputObject(Constants.OUTWORD, "test.doc");
    l_OutputObj.OutputTxt("Text on Page 1");
    l_OutputObj.OutputField(Constants.FIELD_NEWPAGE, "Arial", 10, Constants.C_BLACK, Constants.C_BLACK, Constants.FMT_LEFT);
    l_OutputObj.OutputTxt("Text on Page 2");
    l_OutputObj.WriteReport();

Regards,

Amol Patil

0
by Vladimir Bis
Posted on Mon, 03/26/2012 - 16:15

Hi Amol,

thank you, it work's! I try OutputField method within BeginTable and Endable and it doesn't work... I wanted to split table.

0
by Amol Patil
Posted on Mon, 03/26/2012 - 20:48

Hi Vladimir,

Splitting a table, in turn means closing the table and creating a new table here i guess, as using output object we cannot go back to already printed rows and split it from there.

Regards,

Amol Patil

0
by Misha Akopov Author
Posted on Tue, 03/27/2012 - 13:14

Mr. Amol Patil

thanks

 

Can you also help me with table of contents ?

I use this code :

	p_output.BeginSection(false, Constants.SECTION_INDEX)
	p_output.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0)
	p_output.OutputLn("Table of Contents\n", "Sylfaen", 16, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_BOLD  |  Constants.FMT_CENTER, 0)
	p_output.EndParagraph()
	p_output.OutputField( Constants.FIELD_TOC, "ID_DEFAULT_FONT", 11, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_LEFT)
	p_output.EndSection()

 

 

It says :

No table of contents entries found.

 

 

How Can I insert tose entries. I want model names in this table and their pages. But don't know how to do this...

 

0
by Ilya Seletkov
Posted on Sat, 05/12/2012 - 08:05

Hi! One way to add TOC entries in report is to define text style with format constants Constants.FMT_TOCENTRY(0-4) and use this style for headers. Example follows.

В общем, нужно определить стиль текста, который в описании формата включал бы константы уровней содержания. Вот пример:

oOut.DefineF("Заголовок 1",      "Times New Roman", 14, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER | Constants.FMT_BOLD | Constants.FMT_TOCENTRY0, 0, 0, 0, 0, 0, 1);

oOut.OutputLnF("Состав функциональных требований","Заголовок 1");
0
by Misha Akopov Author
Posted on Mon, 05/14/2012 - 09:04
Hi Ilya , thanks for replay. 
I've defined text style the way you wrote but the result is the same :

Table of Contents
No table of contents entries found.

Can you look through the code, where did I make mistake ? 

And is there another method to do this because Constants.FMT_TOCENTRY0 adds indexes to Headers,
 and we don't want them !

Большое спасибо

var output=Context.createOutputObject();
output.DefineF("header1", "Times New Roman", 14, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER | Constants.FMT_BOLD | Constants.FMT_TOCENTRY0, 0, 0, 0, 0, 0, 1);


output.BeginSection(true, Constants.SECTION_INDEX)
output.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0)
output.OutputLn("Table of Contents\n", "Times New Roman", 16, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_BOLD  |  Constants.FMT_CENTER, 0)
output.EndParagraph()
output.OutputField( Constants.FIELD_TOC, "ID_DEFAULT_FONT", 11, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_LEFT)
output.EndSection()



output.OutputLnF("Header value1","header1");
for (var i=0; i<12 ; i++ ){
    output.OutputLn("  some text ","Times New Roman", 8,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_LEFT | Constants.FMT_BOLD,0); 
}
output.OutputLnF("Header value2", "header1");

output.WriteReport()
0
by Pawel Tarach
Posted on Mon, 05/14/2012 - 10:18

Misha,

TOC is builded when the report is opening by doc's editor. You must using header style used by editor for building TOC exactly.

For MSWord it depends on localization of editor, by ex: "Заголовок 1", "Header 1", "Nagłówek 1". So the "Header 1", not "header1". Unfortunately ARIS API hasn't any function for change or test it.   You can format TOC by using Output.SetTocFormat function.   Regards Pawel Tarach  
0
by Misha Akopov Author
Posted on Mon, 05/14/2012 - 11:26

Thanks Mr. Pawel Tarach ,

I almost did it , "Heading 1" worked. But when report opens in MSword,  again it says

Table of Contents
No table of contents entries found.

and when I make update to the table from Word - the table shows up. Should I specify something ?

 

0
by Ilya Seletkov
Posted on Mon, 05/14/2012 - 11:54

As for me, I don't have to use only names of styles from my MS Word. In next example the TOC styles named 123 and 456 and it works properly.

var sFile   = "123.doc";    
var oOut    = Context.createOutputObject(Constants.OUTWORD, sFile);
oOut.Init(1049);
oOut.DefineF("123",      "Times New Roman", 14, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER | Constants.FMT_BOLD | Constants.FMT_TOCENTRY0, 0, 0, 0, 0, 0, 1);
oOut.DefineF("456",      "Times New Roman", 12, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT |  Constants.FMT_TOCENTRY1, 0, 0, 0, 0, 0, 1);
oOut.DefineF("Text",         "Times New Roman", 12, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT                   , 0, 0, 0, 0, 0, 1);
oOut.OutputField(Constants.FIELD_TOC, "Times New Roman", 14, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT);
oOut.SetAutoTOCNumbering(false);
oOut.OutputLnF("Text","Text");
oOut.OutputLnF("Text","Text");
oOut.OutputLnF("Text","Text");
oOut.OutputLnF("Состав функциональных требований","123");
oOut.OutputLnF("Text","Text");
oOut.OutputLnF("Состав функциональных требований2","456");
oOut.WriteReport(Context.getSelectedPath, sFile);

So as not to add indexes for headers you have to use function  oOut.SetAutoTOCNumbering(false);

--

Ilya

0
by Pawel Tarach
Posted on Mon, 05/14/2012 - 12:47

Misha,

 

I took your example and ...

I use Polish releases of MSOffice, so I changed the your style "header1" with something what understands my editor.

var output=Context.createOutputObject();
output.DefineF("Nagłówek 1", "Times New Roman", 14, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER | Constants.FMT_BOLD | Constants.FMT_TOCENTRY0, 0, 0, 0, 0, 0, 1);
  
output.BeginSection(true, Constants.SECTION_INDEX)
output.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0)
output.OutputLn("Table of Contents\n", "Times New Roman", 16, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_BOLD  |  Constants.FMT_CENTER, 0)
output.EndParagraph()
output.OutputField( Constants.FIELD_TOC, "ID_DEFAULT_FONT", 11, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_LEFT)
output.EndSection()
 
 
 
output.OutputLnF("Header value1","Nagłówek 1");
for (var i=0; i<12 ; i++ ){
    output.OutputLn("  some text ","Times New Roman", 8,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_LEFT | Constants.FMT_BOLD,0);
}
output.OutputLnF("Header value2", "Nagłówek 1");
 
output.WriteReport()

... and got the following results.

Regards

Pawel Tarach

0
by Misha Akopov Author
Posted on Mon, 05/14/2012 - 16:39

Mr. Ilya Seletkov

Mr. Pawel Tarach

Again It doesn't show me the TOC :( I've copied both your codes ( in Pawel's code  I updated "Nagłówek 1" with "Heading 1", it's in english version),

but no result ...     Actually , when I open the Table of content MS WORD dialog box (in the picutre above) , the styles I use in code are there ("Heading 1" , even "123" ,  "345" as in Ilya's example) , but table of contents is empty.  (No table of contents entries found.) Maybe there is something additional that I should have on ARIS Server ???   should I install ms word on it :D

 

0
by Pawel Tarach
Posted on Tue, 05/15/2012 - 10:20

In reply to by urbanosaure

What style requires the TOC of your editor?

Check the TOC in the generated report (No table of contents entries found.) and open it for editing. On the TOC window you get the necessary information about nedded style of 1st level header. Then use this style in your ARIS code to generate the header.

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