简体   繁体   中英

Pentaho CDE Change Column Order Dynamically for Table Element

I have a table component on my dashboard with value for past 12 month like this

在此处输入图片说明

My question is, for next month i need to manually change the order of columns (eg. first column will be OCT, second will be NOV etc.)

Is there any way i can change column order a JQuery data table according to the date of current month? If it is September right now, the last column will be Aug then back to 12 months. I was thinking of using something like colReorder funcion in JQuery in PRE EXECUTION.

You may try to do that in the post fetch of the table component : it's a function that take one parameter containing the resultset (explore it with the debugger) :

function(r) {

//rearrange the content of r according to your need. Beware to arrange both metadata and values!
     return(r); //This will return your modified resultset     
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM