Cognos Analytics

 View Only
  • 1.  CSV Delimiter

    Posted Mon May 03, 2021 06:16 AM
    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


  • 2.  RE: CSV Delimiter

    IBM Champion
    Posted Tue May 04, 2021 03:45 AM
    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

    IBM Champion
    Posted Tue May 04, 2021 11:13 AM
    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 Wed May 05, 2021 03:19 AM
    Excellent. Thank you very much for your suggestions.

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