Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Crosstab Sorting using script
Rainer
Hi all, <br />
<br />
In my report I?m sorting crosstab depending on user parameter by using de api. In report designer I can do this easily by using sorting tab on crosstab. This is what I get when defining sorting this way:<br />
<br />
<property name="sort"><br />
<sort-element><br />
<expression name="key" type="javascript">data["situation_count_SituationGrp/situation_name_DateGrp/date"]</expression><br />
<property name="direction">desc</property><br />
<property name="strength">-1</property><br />
<property name="member"><br />
<span style='color: #FF0000'><member-value><br />
<property name="value">26.08.2010</property><br />
<property name="level">DateGrp/date</property><br />
</member-value></span><br />
</property><br />
</sort-element><br />
</property><br />
<br />
I can get all the properties in script to do sorting using de-api except those which are member-value tag. Does anybody know how to set them programatically?<br />
<br />
Thanks in advance<br />
<br />
Regards Rainer
Find more posts tagged with
Comments
Rainer
ok, got it.
at the end it was very simple to find a solution which fits my report. For now this is quick and dirty but it shows how to do it.
newValue = "xxxxx";
reportContext.getDesignHandle().findElement("NewLevel View1")
.getProperty("sort")
.get(0) // a bit tricky, you get an ArrayList here
.getMember().setValue(newValue);
Regards Rainer
mwilliams
Thanks for the update! Glad you found a solution!