How to create csv filesEach DataStream in a report can generate a csv file from its query. These are the steps required to generate and use a csv file.1. In the definition of the DataStream, use csv=yes. <DataStream name=dsname ... csv=yes > 2. When you run the report, pass several additional parameters: do_csv=t3. To add a link to your report which connects to the csv file, use the predefined variable named the same as your datastream. For example, if your datastream name is deptemp, use: <A HREF=:deptemp:>CSV file</A> The browser viewing the report may be set to open csv files in a spreadsheet program such as Excel. If the browser is not programmed to open csv files, you will see the plain text of the file. This may be saved or copied from the browser. CSV File namesThe csv files are named:$rootdir/$csvdir/reportname-nnnnn.csv Each report run creates a new file. There is no automatic utility for removing obsolete csv files, however, it is recommended that a cron job be created to removed these files if they are older that a few hours up to a day. |