Cognos Analytics

Expand all | Collapse all

CSV Delimiter

  • 1.  CSV Delimiter

    Posted 11 days ago
    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
    ------------------------------


  • 2.  RE: CSV Delimiter

    Posted 10 days ago
    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
    ------------------------------



  • 3.  RE: CSV Delimiter

    Posted 10 days ago
    Hi Ori,

    You might want to use RSVP.CSV.DELIMITER. It specifies the field delimiter character used for CSV output.

    Note: I have seen nothing relevant with REST API.

    Source: https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=reference-report-service-batch-report-service-advanced-settings

    Best regards,

    Patrick Neveu

    ------------------------------
    Patrick Neveu
    ------------------------------



  • 4.  RE: CSV Delimiter

    Posted 9 days ago
    Excellent. Thank you very much for your suggestions.

    ------------------------------
    Ori
    ------------------------------