KM

Hi,

I am inserting a logo into a tablecell, but when I am trying to Right align the logo, it is not happening. FMT_CENTER & FMT_LEFT are working fine when I am using it with either tablecell or BeginParagraph. But I am failing when I am using FMT_RIGHT, because when I am using FMT_RIGHT it is behaving the same way as FMT_LEFT and the logo is getting left aligned to the tablecell.

Below is the part of code where I am struggling.

p_output.TableCell("",a, getString("ID_DEFAULT_FONT"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0,  Constants.FMT_RIGHT, 0)

p_output.BeginParagraph(Constants.FMT_RIGHT, 100, 1000, 0, 0, 0)

var image = Context.createPicture("Fonterra1.png")   

p_output.OutGraphic(image, -1, 20, 20) p_output.EndParagraph();     Thanks in advance.   Regards, Kaushik
by Torsten Haase
Posted on Fri, 04/11/2014 - 15:38

Hi Kaushik,

this is a bug in 9.5. It will be fixed in 9.6 and the following code will run fine:

 

var p_output = Context.createOutputObject()

p_output.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT,  Constants.FMT_LEFT | Constants.FMT_REPEAT_HEADER, 0)
p_output.TableRow()

p_output.TableCell("", 50, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0,  Constants.FMT_RIGHT, 0)
p_output.BeginParagraph(Constants.FMT_RIGHT, 0, 0, 0, 0, 0)
var image = Context.createPicture("fonterra1.png")   
p_output.OutGraphic(image, -1, 20, 20)
p_output.EndParagraph();

p_output.TableCell("", 50, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0,  Constants.FMT_LEFT, 0)
p_output.BeginParagraph(Constants.FMT_LEFT, 0, 0, 0, 0, 0)
var image = Context.createPicture("fonterra1.png")   
p_output.OutGraphic(image, -1, 20, 20)
p_output.EndParagraph();
p_output.EndTable("", 100, getString("ID_DEFAULT_FONT"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0)
p_output.WriteReport()

 

0
by Kaushik Mishra Author
Posted on Mon, 04/14/2014 - 02:32

Hi Torsten,

Thanks so much for your reply !! Was scratching my head over this for quite a long time. Thanks again mate.

Regards,
Kaushik

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