deusamalka Posted October 2, 2007 Share Posted October 2, 2007 Hi, everybody. I've looked for this information in google, in this forum. Unfortunaly, I wasn't able to find it :( I need to put a table dinamically in a JasperReport. This table will probably be written in HTML. Explaing better: each product in has a name, a table and a picture. So, when I select the product to populate a detail in JasperReport, I expect it to show its name, its picture AND its table. No, the table does not need to be in HTML, is there any other objects (beside numbers and string) that could be used? I do not need a Subreport because the table is static, i.e. IT SHOULD NEVER CHANGE to the same product. I would like to have a PDF report. I've seen the HTML tag 'font' is allowed when 'Is Styled Text?' is set to 'true', but HTML tag 'table' didn't work the same way. Is that possible? Link to comment Share on other sites More sharing options...
uhurusurfa Posted October 9, 2007 Share Posted October 9, 2007 The "isStyledText" option supports limited embedded formatting.Bold, underline, italics, text size and colour, strikethru and I think subscript and superscript. Link to comment Share on other sites More sharing options...
uhurusurfa Posted October 9, 2007 Share Posted October 9, 2007 Suggest you create a subreport per product sized appropriately with the table layed out in the sub report. If you name the sub report file correctly you can dynamically link in the sub report with the product into your main report.Use a sub report file name that includes the product name (say there were products fishing_rod, bicycle, etclike fishing_rod_1_table.jrxml then include the sub report in the main report using a report definition like :$P{SUB_REPORT_PATH} + $F{productName} + "_table.jasper NOTE: This assumes your product name is retrieved from an SQL statement in the main report but this might give you the starting point. You could equally add other fields into the name of the file to uniquely identify the products "table" sub report such as product code etc. Link to comment Share on other sites More sharing options...
deusamalka Posted October 9, 2007 Author Share Posted October 9, 2007 Thanks for your answer :) But I've gived up from JasperReports. I'll use pure HTML for my report. Well, it fits my problem :whistle: :laugh: 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