SY

Hello,

My ARIS Scripts are as follows.

oOutput.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0);
oOutput.OutputField(Constants.FIELD_DATE, "Arial", 14, RGB(0,0,0), Constants.C_TRANSPARENT,   Constants.FMT_BOLD  |  Constants.FMT_CENTER);
oOutput.EndParagraph();

Case 1

Output format *.DOC, the output is

2011-09-15

Case 2

Output format *.pdf, the output is

11.9.15

I have no idea of this different output in Case 1 and Case 2.

I want to print out like Case 1's output like "2001-09-15" in pdf format.

Can anyone tell me how to correct this problem ?

Regards

by Jens Heylmann
Posted on Thu, 09/15/2011 - 09:03

Hi,

instead of using Constants.FIELD_DATE use JAVA SimpleDateFormat Class. This should work in both cases:

 

var oSimpleDateFormat = new java.text.SimpleDateFormat( "yyyy-MM-dd" );
var dateVal = oSimpleDateFormat.format( new java.util.Date() );

oOutput.BeginParagraph( Constants.FMT_CENTER, 0, 0, 0, 0, 0);
oOutput.OutputField(dateVal, "Arial", 14, RGB(0,0,0), Constants.C_TRANSPARENT,   Constants.FMT_BOLD  |  Constants.FMT_CENTER);
oOutput.EndParagraph

 

0
by AUGUSTINA PRAPA
Posted on Tue, 09/27/2011 - 14:42

Hello Jens,

the solution you propose is perfect. I have only one comment: The method Output or OutputF should be used instead of OutputField. This means that in line 5 the method OutputField should be replaced by Output or OutputF.

Thanks,

Augustina

0
by Jens Heylmann
Posted on Tue, 09/27/2011 - 15:32

Hi Augustina,

of course, you're right :)

Cheers,

Jens

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • MS
  • PacMan

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