Project: Birt
Bug 125060 Export to CSV should repeat values in each data row
Reported: 2006-01-24 14:51:51 | Status: resolved fixed

When a user exports content to CSV, they typically do so in order to further manipulate the data using other tools such as Excel. For example, to export the data and then build an Excel Pivot Table around the data. They typically do no want to export the data in it's "visual" format -- they want the raw data so they can work with it. To support this common usage, when exporting to CSV from the viewer, the value for each column should be repeated in each row. That is, we should do a data export rather than trying to approximate the formatted layout of the report. For example, if you export data using BIRT 2.0 from the report design attached to bugzilla entry 125058, you get something like: Classic Cars 1948 Porsche 356-A Roadster Scale: 1:18 ... 1948 Porsche Type 356 Roadster Scale: 1:18 ... 1949 Jaguar XK 120 Scale: 1:24 ... ... This does not support the analysis that users are going to typically want to do. We should export this as: Classic Cars 1948 Porsche 356-A Roadster Scale: 1:18 ... Classic Cars 1948 Porsche Type 356 Roadster Scale: 1:18 ... Classic Cars 1949 Jaguar XK 120 Scale: 1:24 ... ...

Files changed in fix:
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/DataExtractionTask.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/DataIterator.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ExtractionResults.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ResultMetaData.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/ReportQueryBuilder.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/ir/Report.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java