Jump to content
Changes to the Jaspersoft community edition download ×

How to send xml list node to Scriptlet method to complex process data and retrieve-show a list back


krlosferra

Recommended Posts

Hello everyone,

I´ve been working several days in this and I can´t get the right way to solve it. Let´s take this example XML.

<ReadingList>

<Reading>
                                    <idReading>123</idReading>
                                    <value>66.0</value>
                                    <endValue>34.0</endValue>
                                    <initialValue>12.0</initialRValue>
                                </Reading>
                                <Reading>
                                    <idReading>123</idReading>
                                    <value>66.0</value>
                                    <endValue>34.0</endValue>
                                    <initialValue>12.0</initialRValue>
                                </Reading>

<ReadingList>

I don't have any problems to list every Reading in mi jasper report, I just use XPath and point the Reading node as queryString.

The problem is when I need to do some operations and more logic operations over the Readings and show the data when is already processed, thought one way could be send as a list the ReadingList node to my own Scriptlet class and do everything there, but I'm not getting the correct way to do it. Please, I'd really aprecciate if someone could help me with it.

Link to comment
Share on other sites

  • 9 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello,

Did you found a solution ? I'm facing a similar problem.

Considering your example, I tried to define "ReadingList" as a field ('Add node as field' in the Dataset and Query Dialog) but I don't know how to receive its value (Node? String ?) in the servlet. I tried to use the function Object getFieldValue(String fieldName) but it didn't worked.

Link to comment
Share on other sites

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