Cognos Analytics

Cognos Analytics

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

 View Only
Expand all | Collapse all

How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

  • 1.  How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Tue January 28, 2020 04:01 PM

    Working with Cognos 11

    The user runs a report and selects hundreds of orders

    He then uses regular filtering options on the report. when completed

    User needs the Data Base to be updated with a list of the selected orders

    With a " printed_on_date" value for ALL the orders, he can not go order by order as that will take forever

    Any suggestion?

    (The report has to be done via Cognos as the filtering process is very complex!  )

    I tried to add a drill through button – however, I am struggling with sending a list based on a query – so any suggestions on how to send a list of values (that are not in a parameter )?



    ------------------------------
    Barry Morris
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 03:49 AM
    >Any suggestion?
    A) Might use Javascript to iterate over the result and send information to the server to save the printed-on date
    B) Might ask the user to upload the report-results to the server for saveing the printed-on date of the selected orders

    ------------------------------
    Ralf Roeber
    Managing Partner
    Amvara Consulting
    El Masnou
    ------------------------------



  • 3.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 11:21 AM
    ​Do not really understand you question - exactly. Are you asking how to update the database from a Cognos report? We looked into this and came up with the concept of setting up a new Cognos Shared Library - TransactionLibrary. Set the report to output to TransactionLibrary. Then create a program (powershell maybe) that would look in the TransactionLibrary for a specific file name and then open, read each row, perform the updates, rename file to add timestamp, and then move file to backup folder.

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



  • 4.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 12:50 PM
    I agree, if the issue is interpreted correctly, once the user applies all necessary filters, they could run to Excel or CSV output, but then those outputs would require some external process (like powershell) to grab that output and then process it further, in your case "update the database".
    As to the drill-through idea, this could also be something that passes the user's selected values from the base report, then push them into a target report via the drill-through.  The target report would just be a simple list of the values and you would set the format to CSV or Excel, but this still doesn't handle the database update, it just makes the output task a bit more elegant.

    ------------------------------
    Albert Valdez
    albert@intelalytics.com
    ------------------------------



  • 5.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 03:45 PM

    Hi Thank you all for all the responses

    I found a solution for updating the database with a list of values – I am using the SQL for queries, My Connection has written back authorizations

    However, I still have a problem with transferring a list of values via a drill through

     



    ------------------------------
    Barry Morris
    ------------------------------



  • 6.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 04:00 PM
    Can you explain how you are updating the database from a cognos report?​

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



  • 7.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Sat February 01, 2020 08:00 AM
      |   view attached
    Hello Brenda 

    Since the initial post, I tested writing back using the SQL part of a query

    And it works, I just update a list using a For

    So many lines are updated in on instance

    However this solution as its risky – So I would be happy with a better solution,

    Furthermore, I still have a problem

    With a report that has data filtered by a user in the report and the drill through to another report and only contains the final filtered data



    ------------------------------
    Barry Morris
    ------------------------------



  • 8.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Wed January 29, 2020 04:04 PM
    Hi Barry,

    Are you using a Framework Manager package in this report?​  If so, have you considered using a Stored Procedure query subject to perform the database update?  This is what I've done in the past where I needed to update the database using information a user has entered into a prompt.  Stored Procedures leveraged in this way are fully supported... but only if using Framework Manager.

    Best,

    Rich

    ------------------------------
    Richard Chester
    ------------------------------



  • 9.  RE: How to: write back / update data base with a list of values from a filtered report ? any suggestions ?

    Posted Sat February 01, 2020 07:51 AM

    Hi Richard, Yes I am using Framework Manager,

    The issue is that most examples I found the procedure only update one value – however in this case I need to update a list (array ) of orders.

    In the past I updated each order separately – however in this case I need to update hundreds of orders each time with the exact same values, do you have an example where multiple lines of data where updated in one update?



    ------------------------------
    Barry Morris
    ------------------------------