Match content of a report where column names dynamic using java -


i have dynamic report generate column names fetch database table displays rooms booked employee on given period. below,

name dept room1(2) room2(2) room3(3) total     d1     1        1                 2  b    d2     2                 1        3 b    d3     1        1        1        3 

rooms can dynamic can have room4 or room5 if there booking identified period.

i made roomheaderdto list has names ordered capacity of room (in brackets of room name display capacity). name , dept column made hard coded , populate room names iterating list.

now problem how place values on number of booking in relevant room. have list of dto names contentdto have each rows values populate with. example,

contentdto    string name;  //a   string dept;  //d1   string roomname; //room1(2)   int noofbooking; //1 

so instance of dto contains values a, d1, room2(2), 1 wise.

so above how dto looks first row. (i have commented values initialized)

since column name dynamic, how should identify relevant room name , put num of booking value when iterate contentdto (rows) list


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -