Jump to content
We've recently updated our Privacy Statement, available here ×

How to use Map<String, Object> parameter


szy.ly
Go to solution Solved by olyncircle,

Recommended Posts

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  ?

 

Link to comment
Share on other sites

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