Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic Sorting on aggregated column
srilekhach
<p>Hi,</p>
<p> </p>
<p> I am trying to perform interactive sort on aggregated column using birt 4.5. I followed the below link</p>
<p> </p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1021-dynamic-column-sorting'>http://developer.actuate.com/community/forum/index.php?/files/file/1021-dynamic-column-sorting</a></p>
;
<p> </p>
<p>It is not working . Please help.</p>
<p> </p>
<p>Thanks,</p>
<p>Sri</p>
Find more posts tagged with
Comments
Matthew L.
<div>I believe the issue is that the direction values "desc" and "asc" are case-sensitive.</div>
<div>Try changing the values to lowercase to see if that fixes the issue.</div>
<div>Example:</div>
<div>table = reportContext.getDesignHandle().findElement("publisherReportTable");</div>
<div> </div>
<div>if (params["SortDir"].value == "Desc"){</div>
<div> table.getListProperty("sort").get(0).setProperty("direction","<strong><span style="color:#ff0000;">desc</span></strong>");</div>
<div>}else{</div>
<div> table.getListProperty("sort").get(0).setProperty("direction","<strong><span style="color:#ff0000;">asc</span></strong>");</div>
<div>}</div>
srilekhach
<p>Hi Matthew,</p>
<p> </p>
<p> Thank you for response. I tried changing the values to the lower case. When try to sort I can see values for SortDir and SortKey in the URL</p>
<p> </p>
<p><strong>publisher.rptdesign&__format=html&publisherId=****&hideTable=true&SortDir=<span style="color:#a52a2a;">Desc</span>&endDate=****&SortKey=</strong><span style="color:#a52a2a;"><strong>xx.sh</strong>ow</span>&startDate=xxxx</p>
<p> </p>
<p>But the table values are not sorted according to the sortDir.</p>
<p> </p>
<p>Thanks,</p>
<p>Sri</p>
Matthew L.
<p>I conducted a few tests using similar logic to your posted report and it works for me.</p>
<p>Are you running the report against an iHub/iServer/Maximo/Something custom?</p>
<p>What is the full URL you are testing with?</p>
<p>Could you be running the report against a generated .rptdocument (that's what I was doing at first before I realized why it wasn't working)?</p>
<p> </p>
<p>You can also test to see what happens if you create a second report with a few simple labels in it that have hyperlinks (Drill-through links) to your original report and have each label pass a different parameter value to test your reports logic.</p>
srilekhach
<p>Hi Matthew,</p>
<p> </p>
<p> I tried running the report on Tomcat server and through eclipse>run>viewreport>In Web viewer</p>
<p>either ways the report is not generating the expected sort functionality.</p>
<p> </p>
<p>Below is the Web viewer url</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://127.0.0.1:53352/viewer/frameset?__report=/Users/svelic001c/Documents/workspace/Birt+Demo/publisher.rptdesign&__format=html&publisherId=****&hideTable=true&SortDir=Desc&endDate=20170601&SortKey=****.show&startDate=20170601&__overwrite=true&__locale=en_US&__timezone=PST&__svg=true&__designer=true&__resourceFolder=/Users/xxxx/Documents/workspace/Birt+Demo'>http://127.0.0.1:53352/viewer/frameset?__report=/Users/svelic001c/Documents/workspace/Birt+Demo/publisher.rptdesign&__format=html&publisherId=****&hideTable=true&SortDir=Desc&endDate=20170601&SortKey=****.show&startDate=20170601&__overwrite=true&__locale=en_US&__timezone=PST&__svg=true&__designer=true&__resourceFolder=/Users/xxxx/Documents/workspace/Birt+Demo</a></p>
;
<p> </p>
<p>Thanks,</p>
<p>Sri</p>