Since the delimiter is an environment setting, you're not going to be able to define a specific delimiter on a report basis. What's super frustrating is that the CSV export seems to ignore any layout text. I was originally thinking that you would be able to drag each data item into a single list cell and manually add whichever delimiter you want as a text item, or use a layout expression to concatenate them. Unfortunately the concatenation has to be done in the query.
Something like this:
case when [Time] is null then '' else [Time] end
+ '::' +case when [Fiscal Year - Name] is null then '' else [Fiscal Year - Name] end
+ '::' +case when [Desc] is null then '' else [Desc] end
+ '::' +case when [HC] is null then '' else [HC] end
+ '::' +case when [-1] is null then '' else [-1] end
+ '::' +case when [Previous Yr Period] is null then '' else [Previous Yr Period] end
+ '::' +case when cast([Month Number],varchar(5)) is null then '' else cast([Month Number],varchar(5)) end
+ '::' +case when [Caption] is null then '' else [Caption] end
+ '::' +case when [Member Description] is null then '' else [Member Description] end
Instead of '::' use a data item with the delimiter. You could even make that data item a prompt so the user could decide which delimiter to use.
Drag that, and only that, into your list for CSV. Since Cognos is detecting only a single field, it won't try to use the environment setting for the delimiter.
If your data source is a cube use a union query as the source for the list where you put the concat expression. Simply nesting the query won't work:
------------------------------
Paul Mendelson
------------------------------
Original Message:
Sent: Mon May 03, 2021 06:15 AM
From: Ori
Subject: CSV Delimiter
Hello community,
Does anyone know if there is a functionality to generate multiple reports in multiple CSV-formats (different delimiters)?
For example:
Report A - CSV format with delimiter ";"
Report B - CSV format with delimiter " "
Thanks for your feedback.
------------------------------
Ori
------------------------------
#CognosAnalyticswithWatson