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

Lists in Python -

android - can not access to progress bar in an other activity -

html - Not able to access next element of an array javascript -