Jump to content
JasperReports Library 7.0 is now available ×

Accessing array objects from report


ktrinad

Recommended Posts

By: ulusoy - ulusoy

Accessing array objects from report

2004-10-20 01:44

Hi,

 

I have a array of data using as datasource (JRBeanArrayDataSource) to fill my report.

I can not access values of some elements in the array.

 

I declare a field as an object like;

 

<field name="accountType" class="java.lang.Object"> </field>

 

And I want to show the name and the code of accountType object by using getAccountTypeName(), getAccountTypeCode() methods declared in AccountType class. I want to cast the object accountType and use getAccountTypeName() methods to access the name of the account name like;

 

<textFieldExpression class="java.lang.String"><![CDATA[((model.account.vo.AccountType)$F{accountType}).getAccountTypeName()]]>

</textFieldExpression>

 

as I also include the "model.account.vo" in the build path, I get an error like

 

[10/20/04 11:04:13:546 EEST] 69f169f1 SystemErr R C:Program FilesIBMWebSphere StudioApplication Developerv5.1.2HesapListesi.java:105: package model.account.vo does not exist

value = (java.lang.String)(((model.account.vo.AccountType)((java.lang.Object)field_accountType.getValue())).getAccountTypeName());

 

 

I'm doing something wrong but I could not overcome this problem.

Is there an example of accessing array objects from report?

All help is highly appreciated.

 

Thxs

 

Lutfu.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...