Cognos Analytics

 View Only
  • 1.  Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Fri August 16, 2019 03:03 PM

    ​Hello,

    Scheduled reports saved to an external file location creates the report output file and a XML file.
    Is there any way to not have this XML file automatically created and saved along with the report?

    Thank you,
    Jen



    ------------------------------
    Jenifer Broughton
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Mon August 19, 2019 09:19 AM
    Edited by System Fri January 20, 2023 04:17 PM
    Hello Jen,

    When you save a report output to an external location, an XML descriptor file is also created for the output file. The descriptor file contains information about the report output, such as the name, locale, creation time, burst key, search path for the associated report, and report version contact. The descriptor file takes the name of the output file with the added suffix _desc. For example, a saved PDF report named My report-en-us.pdf will have a descriptor file named My report-en-us_desc.xml.

    The best way to remove those files is to create and schedule simple batch script with the following code:

    del *_desc.xml    

    Also I'm not sure if you noticed, but Cognos appends language and location (example: "-en-us") to all externally saved reports.

    Let me know if you have any questions.
     




  • 3.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Mon August 19, 2019 11:32 AM
    Hello Dmitriy,

    Is there a way to create the externally saved report without language and location ( "-en-us" ) appended to the file?

    Thanks,
    Vithal

    ------------------------------
    Vithal Madhira
    ------------------------------



  • 4.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Mon August 19, 2019 04:14 PM
    Edited by System Fri January 20, 2023 04:25 PM
    Unfortunately, it's not possible. However, you can execute a simple batch script to remove "en-us".





  • 5.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Mon August 19, 2019 04:25 PM
    Thank you for the info, appreciate it.

    Vithal

    ------------------------------
    Vithal Madhira
    ------------------------------



  • 6.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Thu March 04, 2021 01:05 PM
    Can you provide the batch file to remove the "-en-us" from the files.

    Thank you.

    ------------------------------
    Joseph Bankston
    Cognos Administrator / Sr Data Engineer

    Texas
    ------------------------------



  • 7.  RE: Cognos 11 - Saving report to external file creates a XML file - disable this?

    Posted Fri March 26, 2021 07:27 AM
    For windows: Insert code below in a file named for example "rename_files.bat". Then run the bat-file.

    @echo off
    Setlocal enabledelayedexpansion

    :: Set working directory, insert searchpath to your files here
    CD C:\temp


    :: Set pattern for what you want to remove
    Set "Pattern=-en-us"
    Set "Replace="

    :: Below is example to rename all csv files, change this to whatever your file extension is.
    For %%f in (*.csv) Do (
    Set "File=%%~f"
    Ren "%%f" "!File:%Pattern%=%Replace%!"
    )

    ------------------------------
    Per Melinder
    ------------------------------