Jump to content

How to use Map<String, Object> parameter


Go to solution Solved by olyncircle,

Recommended Posts

Posted

Deal all 

 Recently started learning Jasper Report, I have some doubts about data filling.

Question 1

Map<String, Object> parameter = new HashMap<>();parameter.put("my_title", "Hi, I am title");parameter.put("myBean", new MyBean());JasperPrint jasperPrint = JasperFillManager.fillReport(jasperDesign, parameter, new JREmptyDataSource());

about this code ,

I created parameters named "my_title" and  class = java.lang.String with Jaspersoft Studio  ps: <textFieldExpression><![CDATA[$P{my_title}]]></textFieldExpression>

If I want to use javebean like jackson  such as <textFieldExpression><![CDATA[$P{myBean.name}]]></textFieldExpression>

What should I do  ?

 

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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