Jump to content
Changes to the Jaspersoft community edition download ×

JRXMLDatasource: Navigated trough self docume


2005 IR Help

Recommended Posts

By: cbaeza - cbaeza

JRXMLDatasource: Navigated trough self docume

2005-11-28 06:37

Hi,

I wish to do a example, but without sub report. (only 1 .jrxml file)

 

My problem is:

 

Navigates in the <reglam_clau> nodes in the self document with XPath expression.

 

Example:

 

file: “contrato.xmlâ€

 

<contrato>

:

:

<reglamento>

<clausur>

<reglam_clau> information 1</reglam_clau>

 

<reglam_clau> information 2 </reglam_clau>

 

<reglam_clau> information 3 </reglam_clau>

 

<reglam_clau> information 4 </reglam_clau>

:

:

</clausur>

</reglamento>

</contrato>

 

 

 

I have made the Field description as:

 

Field: reglam_clau

Field Class Type: java.lang.string

Field Description: reglamento/clausur/reglam_clau/self::reglam_clau

 

 

…but, it does not work ! :(

 

You have a idea ?

 

Thank an advanced !!

 

Carlos

 

PS:

 

XML Datasource: ../contrato.xml

Select Expression: /contrato

 

 

 

 

 

By: Wal Millard - walmillard

RE: JRXMLDatasource: Navigated trough self do

2005-11-28 19:17

Carlos,

 

I like to put as much info into the select expression and only a little into the Field descriptions.

 

Try this, set the select Expresion to

 

/contrato/reglamento/clausur

 

Set the description to

 

reglam_clau

 

This should give you the data from the tag.

 

if you set the select expression to:

 

/contrato/reglamento/clausur[reglam_clau != '']

 

then you should get all the entrys that are not null.

 

If you are more interested in the xpath self:: control, then have a look at this post.

 

http://sourceforge.net/forum/message.php?msg_id=3154935

 

Luck

walmillard

 

 

 

 

 

By: cbaeza - cbaeza

RE: JRXMLDatasource: Navigated trough self do

2005-11-29 04:35

Hi Walmillard,

Thanks for you help, but lamentably it does not works. I have probed many alternatives as:

 

1: /contrato/reglamento/clausur -> result: nothing

 

2: /contrato/reglamento/clausur/* -> result: only first element

 

3: /contrato/reglamento/clausur/reglam_clau -> result: only first element

 

4: /contrato/reglamento/clausur/self::reglam_clau -> result: null

 

5: /contrato/reglamento/clausur/reglam_clau/self::reglam_clau -> result: only first element

 

an so on,...

perhaps the problem is each field <reglam_clau>, it's very extensive.

 

Example (real document):

<reglam_clau>A) QUE EL APORTE NETO PASARÃ A SER PARTE DEL ACTIVO DEL FONDO, EL CUAL SERÃ ADMINISTRADO LIBREMENTE POR LA SOCIEDAD ADMINISTRADORA E INVERTIDO CONFORME AL REGLAMENTO INTERNO DEL FONDO Y A LAS DEM�S DISPOSICIONES LEGALES Y REGLAMENTARIAS APLICABLES A LOS FONDOS MUTUOS Y SUS FUTURAS MODIFICACIONES. LA SOCIEDAD DEBER� INSCRIBIR MI PARTICIPACI�N EN EL REGISTRO DE PART�CIPES QUE PARA EL EFECTO LLEVA, DEJANDO CONSTANCIA DE LA CANTIDAD DE CUOTAS DE QUE SOY TITULAR.</reglam_clau>

<reglam_clau>B) QUE POR LA NATURALEZA DE LOS FONDOS MUTUOS, ÉSTOS NO PUEDEN GARANTIZAR UNA DETERMINADA RENTABILIDAD SOBRE MI INVERSIÓN, RENTABILIDAD QUE ES ESENCIALMENTE VARIABLE E INDETERMINADA.</reglam_clau>

<reglam_clau>C) QUE EL FONDO MUTUO BANCHILE ACCIONES, POR TENER TÃTULOS QUE SE VALORIZAN DE ACUERDO A LOS PRECIOS DE MERCADO, EL VALOR DE DICHOS TÃTULOS Y, EVENTUALMENTE, EL VALOR DE LAS CUOTAS DEL FONDO MUTUO INDICADO, PUEDE AUMENTAR O DISMINUIR COMO PRODUCTO DE LAS FLUCTUACIONES PROPIAS DEL MERCADO.</reglam_clau>

 

So, if you can help me.....Thanks in advanced.

Carlos

:)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...