So Time Complexity will be O( No of Data + No of Subtotal Rows )
// Get rows_table Reference that is coming from ABAP
var rows_table = xfa.resolveNodes("$record.ROWS_NO.DATA[*]");
// Get length of the table for running the loop.In our above case it will be 3. Loop Will be Run for three times
var length = rows_table.length;
// Loop Subtotal Row, get index one by one and apply formatting
for( var i =0 ; i<length; i++)
{
// Get Subtotal Row_index and use it for further formatting.
var row_index = xfa.resolveNode("$record.ROWS_NO.DATA[" + i + "].ROW_NO").value;
// Explanation for this part given on Previous Blog. Refer that
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_NO").colSpan = "2";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_DATE").presence = "hidden";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_NO").para.hAlign = "center";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "]").fillColor = "192,192,192";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_NO").font.weight = "bold";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_CURRENCY").font.weight = "bold";
xfa.resolveNode("data.MainSubform.ItemDetails.Item.FORM_DATA.DATA[" + row_index + "].INVOICE_AMOUNT").font.weight = "bold";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |