How to pass Date as parameter to jasper report

前端 未结 3 897
悲哀的现实
悲哀的现实 2020-12-20 09:49

I am trying to create JR report which is taking start_date and end_date as parameters.

The query:

SE         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 10:02

    Your code is wrong.

    You should pass parameters as below:

    Map map = new HashMap();
    map.put("frm_date", frm_dte);
    map.put("to_date", to_dte);
    

    You don't need to add P${} to the parameter's name.


    There are a lot of samples in JasperReports distribution package.

    You can look at this sample for more details.

提交回复
热议问题