Jump to content
Changes to the Jaspersoft community edition download ×

Map the field values in Jasper report


dheeraj.madhu

Recommended Posts

Hi, Is it posible to map the values while generating the reports?
Suppose if we have following xml

<response id="1074200577">                                                                                                                                             <results id1="0" id2="0">                                                                                                                                                <field count="7556">one</field>                                                                                                                                    <field count="7524">two</field>                                                                                                                                    <field count="7402">three</field>                                                                                                                                  <field count="7304">four</field>                                                                                                                             </results>                                                                                                                                                     </response>    [/code]

Generating the Report will give this as
 

one7556
two7523
three7402
four7304

However i dont want the names as in the input xml rather i want them to be mapped to different name as

Name 17556
Name 27523
Name 3 7402
Name 4 7304

I tried to do this by inserting the mapped names to Paramerter map. But i was unable to get the new name and set it
I tried to do following code

        <textFieldExpression><![CDATA[$P{[$F{field}]}]]></textFieldExpression>[/code]

But this doesn't work. How to get the map value depending on a key and replace the value in a report?

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