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, KaushikHi 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()