Question
For each request, we have an audit history that I'm displaying as tabular data with 2 rows per page. However, this creates an issue: if I show only 2 rows per page, the remaining space on the page looks empty. On the other hand, if I display 3 ro
For each request, we have an audit history that I'm displaying as tabular data with 2 rows per page. However, this creates an issue: if I show only 2 rows per page, the remaining space on the page looks empty. On the other hand, if I display 3 rows per page, it doesn’t fit well if any row contains a large amount of data.
Below I have attached reference code for this:
Note:We have to display header and general info after page break
any Alternatives for this,
a!localVariables(
local!requestAuditLog:rule!EPR_QE_V_getRequestAuditLog(requestId:ri!requestId,actionNotIn: cons!EPR_ACTION_LIST[1]),
local!tableHeadings: {
"Date",
"User Name",
"Action Taken",
"Note"
},
"
"&if(a!isNullOrEmpty(local!requestAuditLog),"No Notes avaliable for this request",
"
AR Notes
" & local!tableHeadings[1] & "
" & local!tableHeadings[2] & "
" & local!tableHeadings[3] & "
" & local!tableHeadings[4] & "
"&a!localVariables(
local!rows:
a!forEach(
items: local!requestAuditLog,
expression: "
" & text(index(fv!item,"createdDate",{}),"dd/mm/yyyy") & "
" & rule!EPR_DisplayFullUserName(
index(fv!item,"createdBy",{})) & "
" & index(fv!item,"action",{}) & "
" & index(fv!item,"comment",{}) & "
"
),
local!rowsWithPageBreaks: a!forEach(
items: local!rows,
expression: a!localVariables(
fv!item & if(
mod(fv!index, 2) <> 0, "",
if(fv!itemCount=fv!index,"",
"
" & "
"& rule!EPR_HTMLTemplate_SectionHeader()& "
" & rule!EPR_CMPT_GeneralInformation(requestId: ri!requestId) & "
"
))
)
),
joinarray(local!rowsWithPageBreaks, "")
)
&"
")&"
"
)