I am new to Jasper reports. I am using Jaspersoft iReport Designer 4.5.1. to create a report with a dataset of the following format (Let me call it Format1):
╔═══════╦════════════╦═════════════╗
║ Date ║ Q1 ║ Q2 ║
╠═══════╬════════════╬═════════════╣
║ d1 ║ 45.5 ║ 50.6 ║
╚═══════╩════════════╩═════════════╝
where Q1 and Q2 are some computed quotients. Now Jasper designer asks for Series (different colors), Category (X-axis) and Value (Y-axis). Since my "values" are spread across columns, I need to unpivot the data to obtain this format: (Format2)
╔═══════╦════════════╦═════════════╗
║ Date ║ Quo Type ║ Values ║
╠═══════╬════════════╬═════════════╣
║ d1 ║ Q1 ║ 45.5 ║
║ d1 ║ Q2 ║ 50.6 ║
║ ║ ║ ║
╚═══════╩════════════╩═════════════╝
to be able to pass 'Quo Type' as Series, 'Date' as Category and 'Values' as Value. But this will need me to modify the MySQL query attached to the datasource. Since I have a lot of queries in Format 1 for report generation, can this conversion be avoided somehow? Is there a way to use the Format1 to create the reports?