// this is where items that need diagonals added are remembered
var diagonals = [];
// add an item to the diagonals array
function addDiagonal(item) {
diagonals.push(item);
}
// build all the diagonals (for this parent - usually a band) and
// reset the diagonals to empty
function buildDiagonals(parent) {
for (var i=0;i<diagonals.length;i++) {
var line = buildDiagonal(diagonals[i]);
parent.addLogicalElement(line);
}
diagonals = [];
}
// build one diagonal line with the same dimensions as the item it
// will be shown on top of note that you can change line colour, thickness etc. here
function buildDiagonal(item) {
var line = new Packages.com.elixirtech.report2.logical.model.Line();
line.setTop(item.getTop());
line.setLeft(item.getLeft());
line.setWidth(item.getWidth());
line.setHeight(item.getHeight());
line.setLineWidth(20);
line.setLineColor("Black");
line.setLineStyle("Solid");
line.setDivisor(1);
line.setX1(1);
line.setY1(0);
line.setX2(0);
line.setY2(1);
return line;
}
${Enter some text:##How to draw a diagonal line whose co-ordinates move along with the ‘cell’}
buildDiagonals(result);
Your text:
addDiagonal(result);=Properties.getProperty("Param1");
No
NoNoNoNoNo128 bitsNoNoNoNoNoNoNoYes