Problem with Sorting table data [message #559333] |
Thu, 16 September 2010 12:10 |
|
Hi All,
As per the following thread i have embedded sorting script in befroeFactory. But i am getting error message. Please suggest me.
http://www.eclipse.org/forums/index.php?S=effb3763c6d4f471e8 4910218211526d&t=msg&th=159352
My Code is:
importPackage(Packages.org.eclipse.birt.report.model.api);
importPackage(Packages.org.eclipse.birt.report.model.api.ele ments);
importPackage(Packages.com.ibm.icu.util);
importPackage(Packages.org.eclipse.birt.data.engine.api);
delm = reportContext.getReportRunnable().designHandle.getDesignHand le().findElement( "LITEM");
sc = StructureFactory.createSortKey();
sc.setKey("row[\"LNO\"]");
sc.setDirection("desc");
ph = delm.getPropertyHandle(TableHandle.SORT_PROP);
ph.addItem(sc);
Getting following error :
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getPropertyHandle" of null (<inline>#10) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRu ntime.java:3240)
Thanks,
JP.
Thanks,
JP
|
|
|
Re: Problem with Sorting table data [message #559455 is a reply to message #559333] |
Thu, 16 September 2010 17:00 |
|
JP,
the error is that LITEM is not found. Did you name the report item in
its general properties. Also try this if you are using 2.3.2 or above:
delm = reportContext.getDesignHandle().findElement( "LITEM");
Jason
On 9/16/2010 8:10 AM, JP wrote:
> delm = reportContext.getReportRunnable().designHandle.getDesignHand
> le().findElement( "LITEM");
|
|
|
Re: Problem with Sorting table data [message #559619 is a reply to message #559455] |
Fri, 17 September 2010 12:04 |
pasupuleti Messages: 1 Registered: September 2010 |
Junior Member |
|
|
Hi Jason ,
we are using 2.2.1 version
Yes it is named in general properties.
Data soure : XML type
Our requirement as followings
We need to sort the information based on the line number before loading into the report layout . Could please suggest ,how to achieve it in birt 2.2.1.
Thanks,
PA
[Updated on: Fri, 17 September 2010 12:05] Report message to a moderator
|
|
|
Re: Problem with Sorting table data [message #559679 is a reply to message #559619] |
Fri, 17 September 2010 14:51 |
|
Where are you getting line number? Do you want it to be row number?
BTW can you try:
delm = reportContext.getReportRunnable().designHandle.findElement(
"LITEM");
Jason
On 9/17/2010 8:04 AM, pasupuleti wrote:
> Hi Jason ,
>
> we are using 2.2.1 version
> yes it is name the report item in
> general properties.
>
> Data soure : XML type
> Our requirement as followings
>
> We need to sort the information based on the line number before loading
> into the report layout . Could please suggest ,how to achieve it in birt
> 2.2.1.
>
> Thanks,
> PA
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03460 seconds