Is there a way to take in a CSV and create fields or columns to table more quickly?
Posted on May 23, 2018 at 12:55pm
I'm dealing with a jxml file with a table in there. Now I want to insert more columns and attributes to that table. However, insert a column one by one by manual is so troublesome and cumbersome. Is there a way to take in a CSV file with the names of attributes and bulk insert columns or create fields?
Thanks a lot.
Posted on May 24, 2018 at 2:00am
It's not possible.
But as you know the Jasper report is based on jrxml - which is in fact a xml file, you can write your own program to read column names from csv, then add these columns to jrxml.
Posted on May 23, 2018 at 2:54pm
Can anyone let me know - whether this is possible to make in Jasper?
Posted on May 24, 2018 at 8:37am
Thanks for help, but each column has it's unique ID, like "uuid="d5725c8d-60f7-4ee7-99ea-9d7d0a6ca803", which generate by jasper. How could I add them by my code? Do you have any idea?
Posted on May 24, 2018 at 6:23pm
UUIDs are unique identifiers, I think it can be replaced with any other UUIDs.
I tried to replace the UUIDs in my reports with some other random generated UUIDs, the report works fine.
Posted on May 29, 2018 at 8:22am
Thank you, David. That is helpful.
Posted on May 29, 2018 at 3:26pm
I just realized that if I copy the table from one report to another report. Should I change the uuid of each column of the table? There are lots of columns are same in two reports so I just copy one and modified it, but the uuid will be same.