Cognos Analytics

 View Only
  • 1.  Disable report during certain times of day

    Posted Fri August 02, 2024 04:10 PM

    Anyone have a requirement to disable a report during certain times of day. A colleague just asked if there is any way to automatically not allow a report to run at night when the data loads occur so that our queries don't impact the data loads. I mentioned that sounds like a good fit for data sets except they want the data live during the day. I thought of creating a filter that checks the hour of the day and if during a certain hour have then logic result in an error but it seems that it won't even pass validation and run even when not within that hour.



    ------------------------------
    Robert Hofstetter
    ------------------------------


  • 2.  RE: Disable report during certain times of day
    Best Answer

    IBM Champion
    Posted Sun August 04, 2024 03:08 AM

    Hi Robert,

    why don't you create a variable that checks the time directly during report execution and place your report content in a conditional block that's linked to this variabe? If the time is right, the conditional block WITH the report content will be rendered (queries get executed) and if it's not the right time the block WITHOUT any content will be rendered (no queries at all). You could also place a text item in that block to tell users it's not the time to execute the report.

    I use a similar approach to avoid very large reports generated by checking the current amount of data and if it's too much, the reports does not show any data but a filter area that forces the user to modify their filter criteria.

    hope this helps.



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ Gebr. Müller Apparatebau GmbH & Co. KG
    Ingelfingen
    ------------------------------



  • 3.  RE: Disable report during certain times of day

    Posted Mon August 05, 2024 10:23 AM

    That's a good idea. I forgot that conditional blocks mean the underlying query doesn't execute not just that it renders a different object.



    ------------------------------
    Robert Hofstetter
    ------------------------------



  • 4.  RE: Disable report during certain times of day

    Posted Sun September 15, 2024 05:40 PM

    Hi Robert,

    How do you check the current amount of data?

    Thanks!!!



    ------------------------------
    Javier Sendra
    ------------------------------



  • 5.  RE: Disable report during certain times of day

    IBM Champion
    Posted Mon September 16, 2024 01:14 AM

    Hi Javier,

    I place a query calculation in the main query that delivers the data and let this count the number of rows. Based on that query item I create a boole variable that checks its value. Say "[counter]<1000000". Then link a conditional block to this variable which has  to be placed in a data container as the block variable needs data. I use singletons for that approach which have the needed data item in their "properties" checked.



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ Gebr. Müller Apparatebau GmbH & Co. KG
    Ingelfingen
    ------------------------------



  • 6.  RE: Disable report during certain times of day

    Posted Tue September 17, 2024 07:31 AM

    Ok Robert,

    thks!!!!



    ------------------------------
    Javier Sendra
    ------------------------------



  • 7.  RE: Disable report during certain times of day

    Posted Thu September 19, 2024 08:13 AM

    But if you get a result set aren't you running the sql query and blocking sql table updates? 



    ------------------------------
    brenda grossnickle
    BI Programmer Analyst
    FIS
    ------------------------------



  • 8.  RE: Disable report during certain times of day

    IBM Champion
    Posted Thu September 19, 2024 08:35 AM

    Hi Brenda,

    if the variable is data-driven -then yes, you're going to block table if the query needs that (technically). To disable a report to be executed defined by times of a day, you could also use a time variable/expression that does not need a data connection and therefore does not block anything on the db.



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ Gebr. Müller Apparatebau GmbH & Co. KG
    Ingelfingen
    ------------------------------