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

 

Dynamically change Cognos data source connection using parameter maps ?

Started by nike.shah, 20 Mar 2014 06:32:29 PM

Previous topic - Next topic

nike.shah

Hi All,

I have several different database servers in different locations with same data structure. I have designed the cognos reports based on a database, So user who ever is loging into my portal(From the portal i am calling the cognos reports using CognosLaunch()), the respective database server is being changed and the respective data is being populated in my report. I am doing this by creating one data source and then define multiple connections under this single data source name. I have applied security to the connections so that users only have access to the single data source connection they should be using for the report. When the users are loging in they only have access to one connection so they are not being prompted to select a data source and each user is automatically use the connection they have been assigned for the report. Till this point everything works just fine, but there are internal users who has access to more than one client and they are being prompted to select data source connection every time they run the report. I have read somewhere that I can pass which client is being selected on my .net portal using "sessionvariable" and use it with Parameter map within FM to dynamically select data source connection. I am not sure how to approach this issue, so any guidance will be hugely appreciated !!

Thanks.

Lynn

The attached is not exactly the thing you are asking, but perhaps similar enough to give you some ideas?

dinesh.pokale@tcs.com

Hi CognosEnthu,

Did you got any solution to this, i am also having the same situation. pls let me know the solution?
i am using cognos 10.2.2

MFGF

Quote from: DPTCS on 15 Jan 2015 06:54:46 AM
Hi CognosEnthu,

Did you got any solution to this, i am also having the same situation. pls let me know the solution?
i am using cognos 10.2.2

Did Lynn's attachment help you?

MF.
Meep!

dinesh.pokale@tcs.com

Lynn's Document is about the changing the schema dynamically but in my case schema's are same.

My case is :- i have 2 sets of user , one user is admin and another users are basically given access to the respective data connections.
so that works fine since it is not asking to choose the connection and also for admin who has access to all the data connections , cognos is prompting them to choose the connection which is also fine for me.
but, i just want to know how can we create the prompt to allow admin users to select the data connections, instead of cognos provided prompt?

bus_pass_man

By 'cognos provided prompt' do you mean a prompt macro or the prompt you get where there's more than one database in the data source connection?

You could create a macro which uses a parameter map which looks up the user ID and substitutes a value for the ordinary users and a prompt macro for your admins.   

dinesh.pokale@tcs.com

By 'cognos provided prompt' I meant the prompt you get where there's more than one database in the data source connection.

Also, where to create this prompt macro code. since, "content manager data source" property already have data source given.


bus_pass_man

You would put the macro into the content store data source name property, replacing the string which exists there.   You can do the same thing for the catalog and schema properties too.

That macro would look up the user ID of your user and substitute a value based on that.  The user id and values would be defined in a parameter map.  You can use the parameter map in the sample model and the macros which use it as examples.

For your users who are admins, you would have a prompt macro as the value in the parameter map. 

If you take the Framework Manager course you will get instruction on using macros.   Using the sample model as a guide should help get you part of the way.   

Here's the online help too.

http://www-01.ibm.com/support/knowledgecenter/SSEP7J_10.1.0/com.ibm.swg.im.cognos.ug_fm.10.1.0.doc/ug_fm_id18220project_reuse.html%23project_reuse?lang=en

vetteheadracer

You could do this with different database connections from the same Data Source.

Your user would get a dialog asking which database they want to connect to. For example DB 1, DB2, DB3

We do something similar with different releases of the same Database on the same server in development.