how to add report header and footer in csv export

Now i have a report ,it generates both PDF and CSV reports using same data and same JRXML,the csv format output result like below image.the PDF format totally differ from the CSV format output.

now i need to support the two formats in one report ,so my data service(get the data from DB and return a xml file as report datasource) gets invoked once for the generation of both formats.

and i add net.sf.jasperreports.export.csv.column.names(Column A,Column B.....),and net.sf.jasperreports.export.csv.write.header(true) in  report properties .

then accordingly add and in text field properties in detail band.

so it can dispaly only in CSV format and hide in PDF format.

but i don't know how to add the report header(As of Date:yyyy-MM-dd) and report footer(Limited Access..etc).

My declare is clear?

please give me some suggestions?



1031583371's picture
Joined: Jul 9 2013 - 7:22pm
Last seen: 9 years 4 months ago

0 Answers:

No answers yet