gilclefes Posted October 7, 2009 Share Posted October 7, 2009 i'm trying to display a table in my ireport without predifined fields.I have a string parameter. i want to format the content of the string as html tags.Even though i'm using the <td></td> tags , i get only one(1) column when i display my report instead of 4 this what i'm doing String[][] data1 = { {"N263Y", "T-11", " 39 ROSCOE TRNR RACER", "R1830 SERIES"}, {"N4087X", "BA100-163", "BRADLEY AEROBAT", "R2800 SERIES"}, {"N43JE", "HAYABUSA 1", "NAKAJIMA KI-43 IIIA", "R1830 SERIES"}, {"N912S", "9973CC", "PA18-150", "R-1820 SER"} }; String data = ""; data = "<html><head><metacontent=\"text/html; charset=ISO-8859-1\" http-equiv=\"content-type\">" + "<title></title></head><body><tablestyle=\"text-align: left; width: 200px;\" cellpadding=\"2\"cellspacing=\"2\"><tbody>"; for (int i = 0; i < 4; i++) { data = data + "</tr>"; for (int j = 0; j < 4; j++) { data= data + "<td>" + data1[j] + "</td>"; } data = data + "</tr>"; } data = data + "</tbody></table><br></body></html>";the i pass the data variable as a parameter. The markup is "HTML" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now