COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: pacificbeavs on 11 Dec 2019 10:30:41 AM

Title: How to create trailer record for CSV output?
Post by: pacificbeavs on 11 Dec 2019 10:30:41 AM
I need to add a trailer record to my .csv output.  Currently I have a total record in my list report, however when exported to .csv it adds a new column and the total shows up in that new column on the last record with the other data (not a standalone record at the VERY bottom).  How can I get that trailer record to show up on its own row at the very bottom of the report?
Title: Re: How to create trailer record for CSV output?
Post by: Andrei I on 12 Dec 2019 08:30:17 AM
You can do a workaround.

Create two queries: one Query for Details and another query for Summary with the same structure.
You need to add an extra field [Query ID] to identify either it is Details or Summary ( 0 or 1)

Then create third query Union of the first two so the Summary would be the last row.

Then point your list to the Union Query.

Apply Conditional formatting for the List based on the [Query ID] ( if  [Query ID]=1 then apply Summary Formatting)

This should do the trick