Export data to CSV lazarus / 16-Databases ---------------------------------------------------------------------- sin_dragan · 2014-12-16 05:47 Hi, I need to export some data in CSV format from multiple datasets. I have one main dataset and a junction table. To clarify, a general example, one table with book names, one with author names and one junction table BookAuthor. I would like to export to csv AutorName and in one colum all the books that he wrote. EDIT: So far I used lazdbexport and it works nice with one dataset, I just need to know is there an elegant way to solve problem above. One thing that comes to my mind is to change lazdbexport ExportField to include dataset informaton. Or maybe to export via LazReport. ---------------------------------------------------------------------- LacaK · 2014-12-16 07:59 Do you have data in SQL tables ? If yes, then you can do JOIN of two tables to het one DataSet and then export data from this dataset. ---------------------------------------------------------------------- goodname · 2014-12-16 14:08 I've been using LazReport to export to CSV for a long time. It may not be the best method for your application but I know that it works. ---------------------------------------------------------------------- sin_dragan · 2014-12-16 18:24 Quote from: LacaK on December 16, 2014, 08:59:40 amDo you have data in SQL tables ? If yes, then you can do JOIN of two tables to het one DataSet and then export data from this dataset. Yes, I have data in SQL tables, and I m fetching that data via select- join. My problem is how to put values from many side into one column on csv. For example, author name (that's okay) and the books he wrote (author can write one or many books) and I would like to include books that he wrote. Quote from: goodname on December 16, 2014, 03:08:16 pmI've been using LazReport to export to CSV for a long time. It may not be the best method for your application but I know that it works. I think I'll use the same approach, is there specific I should know or just use the tutorial? Thx for your replies ---------------------------------------------------------------------- goodname · 2014-12-16 18:37 Quote from: sin_dragan on December 16, 2014, 07:24:24 pmI think I'll use the same approach, is there specific I should know or just use the tutorial? The tutorials are fairly good. Just build a report and export to CSV as the last step.