Skip to main content



      Home
Home » Archived » BIRT » Problem with Sorting table data
Problem with Sorting table data [message #559333] Thu, 16 September 2010 08:10 Go to next message
Eclipse UserFriend
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.
Re: Problem with Sorting table data [message #559455 is a reply to message #559333] Thu, 16 September 2010 13:00 Go to previous messageGo to next message
Eclipse UserFriend
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 08:04 Go to previous messageGo to next message
Eclipse UserFriend
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 08:05] by Moderator

Re: Problem with Sorting table data [message #559679 is a reply to message #559619] Fri, 17 September 2010 10:51 Go to previous message
Eclipse UserFriend
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
>
>
>
>
Previous Topic:Difference between sorting in BIRT 2.5 and 2.6 (Grouping and sorting in charts)
Next Topic:Arrange Column data in a row
Goto Forum:
  


Current Time: Wed Jul 23 13:57:00 EDT 2025

Powered by FUDForum. Page generated in 0.04435 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top