Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
CSV Export with Dynamic Column Headers
vnguyen
I would like to modify the BIRT Viewer code to change the column names in the header row of the exported CSV file. Can you give me some recommendation on how I can achieve this?
For example, let say in my rptdesign file, I may have a resultset with two columns/names as follow:
columnPrice1
columnPrice2
When exporting to CSV, rather than show "columnPrice1" and "columnPrice2" in the header row of the CSV file, I want to change the header to show "columnPrice" for the header row.
What is your recommendation on making this change? Any feedback is greatly appreciated.
I'm currently using BIRT 2.3.0.
Thanks!
Find more posts tagged with
Comments
JasonW
Why not just use an onRender script and check the output format. For example on columnPrice1 label put:
if( reportContext.getOutputFormat() == "csv" ){
this.text = "columnPrice";
}
Jason