Hello,
I'm new at aras and I'm trying to display in a report values from SQL table. How am I supposed to do that?
Now what I do:
var qryItem = innovator.newItem();
qryItem.loadAML(
"<Item type='incoming' action='get' select='*'>" +
"</Item>"
);
var resultItem = qryItem.apply();
if (resultItem.isError()) {
top.aras.AlertError("Item not found: " + resultItem.getErrorDetail());
return;
}
var count = resultItem.getItemCount();
alert(count); //got two less than in my SQL table
var content = "<table border='1'>" +
"<tr>" +
"<td>TEST</td>" +
"</tr>";
alert(count);
for (var i=0; i<count; ++i)
{
// Get a handle to the relationship Item by index.
// Get a handle to the related Item for this relationship Item.
content += "<tr>" +
"<td>" + resultItem[i]+ "</td>" + "</tr>"; //just to test what I get here, got undefined
}
return content + "</table>";
EDIT;
tried this too, but got the same result:
var qryItem = innovator.newItem("incoming","get");
var qryItem = this.newItem("incoming","get");
qryItem.setAttribute("select","*");
var resultItem = qryItem.apply();