Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
Expand all | Collapse all

Extracting a list of all Cognos reports having a specific object

  • 1.  Extracting a list of all Cognos reports having a specific object

    Posted Thu February 29, 2024 01:02 PM

    Hi,

    I would like to pull a list of all reports that have hyperlink button object used in them. Can this be done using the free version of Motio PI?.

    On checking the documentation of Motio Pi, I could not find out if this can be done using free version of Motio PI. Please suggest. is there any other way this can be done?.

    Best Regards,



    ------------------------------
    Mack L
    ------------------------------


  • 2.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Fri March 01, 2024 02:42 AM

    Hello!

    You can execute SQL query to CS:

    SELECT
        "Query_CS"."CMID" AS "CMID", 
        "Query_CS"."OBJNAME" AS "OBJNAME", 
        "Query_CS"."PATH0" AS "PATH0", 
        "Query_CS"."CREATED" AS "CREATED", 
        "GetSpec"."SPEC" AS "SPEC"
    FROM
        (
        SELECT
            "SQL1"."LEV" AS "LEV", 
            "SQL1"."CMID" AS "CMID", 
            "SQL1"."PCMID" AS "PCMID", 
            "SQL1"."OBJNAME" AS "OBJNAME", 
            "SQL1"."PATH" AS "PATH0", 
            "SQL1"."CLASSID" AS "CLASSID", 
            "SQL1"."CREATED" AS "CREATED"
        FROM
            (
            
    select t.* from(
    select level as lev, cmid, o.pcmid, objname, SYS_CONNECT_BY_PATH(o.objname, ' > ') path, o.CLASSID, o.CREATED
                    from (
                           select obj.CMID CMID
                            , case 
                                    when obj.cmid = obj.pcmid then null 
                                    else obj.PCMID 
                              end PCMID
                            , nm.name objname
                            , obj.CLASSID,
                    obj.CREATED
                           from CMOBJECTS obj 
                                inner join CMOBJNAMES nm on obj.cmid = nm.cmid
                           where nm.isdefault = 1 
                         ) o
                    start with o.PCMID = 0
                    connect by prior o.CMID = o.PCMID) t
    where t.CLASSID =10 
            ) "SQL1"
        ) "Query_CS"
            INNER JOIN 
            (
            SELECT
                s."CMID", 
                s."SPEC"
            FROM CMOBJPROPS7 s
            ) "GetSpec"
            ON "Query_CS"."CMID" = "GetSpec"."CMID" 
    WHERE instr("GetSpec"."SPEC", 'HTMLItem') > 0



    ------------------------------
    Ilyas Yulyev
    ------------------------------



  • 3.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Fri March 01, 2024 04:40 AM

    Hi Ilyas,

    Thank you. Can I run the query you provided on the Content Store DB as it is or is any modification required? I need to find out where content store DB  is located in our Cognos environment and try it.

    Going back to my first question, can the same thing be done using Motio PI (free version)? I assume this is something that can be achieved using Motio PI Pro. Please let me know if you are aware of it.

    Best Regards,



    ------------------------------
    Mack L
    ------------------------------



  • 4.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Fri March 01, 2024 06:11 AM
    1. Yes, you can run this query without modification.
    2. This is not possible in the free version.


    ------------------------------
    Ilyas Yulyev
    ------------------------------



  • 5.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Tue March 05, 2024 01:31 AM

    @Ilyas Yulyev

    I requested the DB admin to run the query on content store and it gave the following errors. The content Store is on MS SQL Server.

    Msg 195, Level 15, State 10, Line 21 'SYS_CONNECT_BY_PATH' is not a recognized built-in function name. Msg 102, Level 15, State 1, Line 34 Incorrect syntax near 'o'. Msg 319, Level 15, State 1, Line 35 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. Msg 102, Level 15, State 1, Line 46 Incorrect syntax near 'GetSpec'.



    ------------------------------
    Mack L
    ------------------------------



  • 6.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Tue March 05, 2024 01:49 AM

    This query is for Oracle. 
    You can export your catalog with reports in Content Administration and search HTML items in file Package1.xml



    ------------------------------
    Ilyas Yulyev
    ------------------------------



  • 7.  RE: Extracting a list of all Cognos reports having a specific object
    Best Answer

    Posted Fri March 01, 2024 10:45 AM

    Hi Mack,

    If you have access to IBM Cognos Configuration on your server, you will find what you need in :

    Data Access / Content Manager / Content Store.

    If you don't know the user/password used for the Content Store database, you need to export the cogstartup.xml then you will be able to read the password in this file.

    Best regards,



    ------------------------------
    Patrick Neveu
    Collaboration Betters The World (CBTW)
    IBM Champion
    ------------------------------



  • 8.  RE: Extracting a list of all Cognos reports having a specific object

    This message was posted by a user wishing to remain anonymous
    Posted Sun March 03, 2024 02:12 PM
    This post was removed


  • 9.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Sun March 03, 2024 04:47 PM

    I've requested that these get removed.



    ------------------------------
    IAN HENDERSON
    ------------------------------



  • 10.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Tue March 05, 2024 04:38 PM

    Yes! we are removing these posts



    ------------------------------
    Lorraine Rizzuto
    Sr. Consultant, Strategic Services
    Higher Logic
    Charlotte NC
    United States
    ------------------------------



  • 11.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Mon March 04, 2024 11:41 AM

    Hi @Ilyas Yulyev, Would you say this is a genereic query and that you may query all kind of object types used in reports just by modifying the last WHERE condition? 



    ------------------------------
    Philipp Hornung
    Business Intelligence Manager
    Techniker Krankenkasse
    Hamburg Germany
    #IBMChampion
    ------------------------------



  • 12.  RE: Extracting a list of all Cognos reports having a specific object

    Posted Tue March 05, 2024 02:08 AM

    Yes, i would. 
    PS: CLASSID =10 is condition for reports.

    CLASSID = 19 - reportView

    CLASSID = 234 - activeReport.



    ------------------------------
    Ilyas Yulyev
    ------------------------------