javascript - BIRT Report Dynamic Sorting Not Working -


i'm trying dynamically sort birt report columns following codes. not woking. there else want do?

i'm using report params "sortdir" & "sortkey" , in table header coloumn using hyperlink.in hyperlink i'm using following expression in "sortdir" param

if(params["sortkey"].value == "sortkeyvalue") {   if(params["sortdir"].value == "asc")   {     "desc";    }    else    {       "asc";        }   }  else  {    "asc";   } 

beforefactory method put code

table = reportcontext.getdesignhandle().findelement("mytable"); if (params["sortdir"].value == "desc"){   table.getlistproperty("sort").get(0).setproperty("direction","desc"); }else{   table.getlistproperty("sort").get(0).setproperty("direction","asc"); } 

ana include propertyeditor--->sorting tab include following expression

 if(params["sortkey"].value == "sortkeyvalue")  {     row["coloumnname"];  }  else if(params["sortkey"].value == "sortkeyvalue")  {    row["coloumnname"];  } 


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -