If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to create write back in cognos 10

Started by mvn.balu, 29 Jun 2012 06:13:45 AM

Previous topic - Next topic

mvn.balu

Hi  can anybody  explain me  how to create write back option in cognos10 please

charon

There is no native write back option...cognos is "read only".
What exactly are you planing to do?
For writing back in your DB, i suggest purchasing a master data tool.
Also, there are solutions for cognos such as "Apparo Fastedit"...search the web for it.

blom0344

I believe TM1 offers some sort of writeback..

Lynn

In addition to TM1 it is possible to use a data modification stored procedure.

MFGF

Quote from: Lynn on 03 Jul 2012 07:23:04 AM
In addition to TM1 it is possible to use a data modification stored procedure.

This is only officially supported for use from within an Event Studio agent, though :)  Having said that, I have known certain individuals to call them from Report Studio reports :)

MF.
Meep!

CognosPaul

Writing this on my phone, so forgive any speling mistakes, please.

Data modification sps won't work inside RS, but the normal ones are fine. Many of my clients have asked for simple data entry pages (to replace the MS entry page) or a comments box.

Write your sp to accept a value, upsert it into your table, and return an error code. The sp absolutely must return something, or it won't work. Import into your model and populate the parameters with macro prompts.publish and open the report.
"
in the report, create whatever promt objects are necessary for your sp. Create a Bool variable that has paramvalue(yourparam) is not null. Create a conditional block set to that variable. Put a singleton into the Yes block. Put the output value of the sp into the singleton (or in the properties of you don't want to display it). Make sure there's a reprompt button on the page.

When you run the report for the first time, the singleton won't render and trigger the sp. When you populate the prompt and hit reprompt, the conditional block will render the singleton, cognos will feed the value into the sp thus updating the db.

Put the conditional block before whatever datacontainer is usd to show the updated values.

charon

sth i wonder how u know all that stuff paul  ???
maybe ure an cognos secret service agent  :o 8)

tjohnson3050

Cool tips on using Stored Procedures!

I believe the initial question was how to use what IBM is advertising as Cognos 10 writeback capability, and that is definately TM1.  TM1 loads data into an in-memory cube, and you can use TM1 tools to write data back to the TM1 in-memory cube.  That data write back is written to a log file (similar to db logging) so if the cube is shut down and restarted, the cube load procedures (Turbo Integrator Processes) load the cube data, then apply the write backs from the write back log files.

As far as how to accomplish the write back, this is done through TM1 interfaces (TM1 Architect or TM1 Web), not through any of the Cognos BI products.  I have seen an IBM demo that uses TM1 Web in a portlet, and when data is written back using that tool, other BI objects on the same page (in other portlets) update to reflect this writeback.

osirisrocket

Its simple the trick is to use 2 store procedures one for select and other for the update/Insert.
Step 1 create the table:
CREATE TABLE  ComentarioIndicadores

(
    [UsuarioId] [nvarchar](60) NOT  NULL,
    [IndicadorId] [int]  NULL,
    [Indicador] [nvarchar](100)  NULL,
    [Comentario] [nvarchar](300)  NULL
)

Insert into ComentarioIndicadores (UsuarioId, IndicadorId, Indicador,Comentario)
Values('osiris', 1, 'Numero de Agentes','Se inicia senso de Agentes Activos')


Insert into ComentarioIndicadores (UsuarioId, IndicadorId, Indicador,Comentario)
Values('osiris', 2, 'Agentes Principales','Se inicia senso de Agentes Activos')

step 2 create the update or insert SP
CREATE procedure [dbo].[ActualizacionComenariosIndicadores] 

@usuarioid nvarchar(60), 
@Indicador nvarchar(100), 
@Comentario nvarchar(300) 

as 
Begin 
Update ComentarioIndicadores set comentario = @Comentario 
where UsuarioId = @usuarioid and Indicador = @Indicador 
End 


step 3 create the select Store procedure

CREate procedure Temporal 
 

@usuarioid nvarchar(60), 
@Indicador nvarchar(100), 
@Comentario nvarchar(300) 

as 
BEGIN 
 
select @usuarioid as UsuarioId ,   
        @Indicador  as Indicador, 
        @Comentario as Comentario 
         
        EXEC ActualizacionComenariosIndicadores @usuarioid,@Indicador,@Comentario 
END 

the trick is right here inside the temporal SP you place the Execution of the insert update SP

Step 4
go the framework any configure the query subject StoreProcedure like a Data Query Type configure the parameters as a normal
parameter stopre procedure query subject

Publish the package

Step 5

In the report studio you place text box prompt for every parameter desired

here is the other trick you must put also a List and place at least one column from the query subject of the store procedure so that the SQL SP can  execute. You can hide the list by putting None in the Box Type property of the list



Saludos!!


cognostechie

I agree with the folks who mentioned here about using RS for writing back. I have a client who has an SP that takes a 'click' from a button on the prompt page and the logic is inside the SP which does calculations and populates tables. They call is 'On Demand Refresh' of data. This way the users have the ability to refresh the data.