Is there a way to take in a CSV and create fields or columns to table more quickly?

0

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.

victorlizonglin's picture
Joined: May 23 2018 - 12:47pm
Last seen: 1 year 2 months ago

Hi Zonglin,

"I tried to replace the UUIDs in my reports with some other random generated UUIDs, the report works fine. "

riodavid - 1 year 5 months ago

Hi David, thank you so much.

victorlizonglin - 1 year 5 months ago

6 Answers:

1

Hi Zonglin,

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.

BR

D

riodavid's picture
507
Joined: Oct 27 2016 - 1:57am
Last seen: 1 year 1 week ago
0

Can anyone let me know - whether this is possible to make in Jasper?

Thanks!

victorlizonglin's picture
Joined: May 23 2018 - 12:47pm
Last seen: 1 year 2 months ago
0

Hi David, 

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?

Thanks!

Zonglin

 

victorlizonglin's picture
Joined: May 23 2018 - 12:47pm
Last seen: 1 year 2 months ago
1

Hi Zonglin,

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.

Thanks

D

riodavid's picture
507
Joined: Oct 27 2016 - 1:57am
Last seen: 1 year 1 week ago
0

Thank you, David. That is helpful.

 

 

victorlizonglin's picture
Joined: May 23 2018 - 12:47pm
Last seen: 1 year 2 months ago
0

Hi David,

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.

Thanks!

victorlizonglin's picture
Joined: May 23 2018 - 12:47pm
Last seen: 1 year 2 months ago
Feedback
randomness