List of parameters to PDF

View: New views
1 Messages — Rating Filter:   Alert me  

List of parameters to PDF

by vishnukumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am new to jasper reports. I am passing parameters as following.

List<String> courseModules = new ArrayList<String>();
    List<String> marks = new ArrayList<String>();
   
    courseModules.add("spoken english");
    courseModules.add("Medical Transcription");
    marks.add("20");
    marks.add("30");
               
    Map model = new HashMap();
    model.put("courseModules", courseModules);
        model.put(“marks”, marks);

I use ResourceBundleViewResolver. In .jrxml, I map parameters as

<parameter name="courseModules" class="java.util.List"/>
<parameter name="marks" class="java.util.List"/>

I got printed as

[spoken English, Medical Transcription]
[20, 30]

But, my requirement is, I have to print like

   Course Mark
Spoken English   30
Medical Transcription 40

I don’t know how to iterate the elements in the list in jrxml or any other solution will be good as well.
Please, help me

Thanks
Vishnu