Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a Filter on a Table in Impromptu Catalog

Status
Not open for further replies.

thanask

Technical User
Oct 27, 2002
21
0
0
Hi,

We had already added nearly 500 users to the catalog and we had applied filters on certain tables based on each user. Now we have to apply the same filter to a new table based on all the 500 users. Is there a way, other than changing to each user and applying the filter on that table.

Thanks,
Kumar
 
Kumar,

Your problem is a little unclear. If you need to exclude access to a table for ALL of the 500 users, just remove it from the parent user class of the users, assuming they share a common parent class. The Cognos macro language does have support for some catalog changes, so if you want to automate the process it is possible. See the product docs, the help file, and the macro examples that ship with the product for more detail.

Regards,

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
 
Hi,

Thanks for ur help.

Let me explain it once again. I have 500 user id for 500 customers and I had applied a filter on the the customer table as mentioned table

user : customer 1
filter : customer_id = 1

user : customer 2
filter : customer_id = 2

like that for 500 customers.

Now I had added a new table into the catalog and I have to apply the same filter on that.

Thanks,
Kumar
 
Kumar,

This is a little clearer, and the second part of my post applies. There is an OLE method to do this. I've copied some of the Macro help file example below. I'm not an expert with modifying catalogs this way, but it looks like you could create a loop to handle such a change for all classes assuming there is a relationship between the class name and the filter values for the table and column to be filtered. See the help files for futher information.

Regards,

Dave Griffin


Sub Main()
Dim objImpApp As Object
Dim objImpCat As Object
Dim objDB as object
Dim objUser As Object
Dim objFilter As Object
Set objImpApp = CreateObject("CognosImpromptu.Application")
Set objImpCat = objImpApp.ActiveCatalog
Set objDB = objImpCat.Databases("OUTDOORS")
Set objUser = objImpCat.ActiveUserClass.UserClasses(1)
Set objFilter = objUser.CreateFilterFor _
(objDB.Tables("COUNTRY").Columns("COUNTRY"))
With objFilter

.AppendEx objDB.Tables("COUNTRY").Columns("COUNTRY")
.AppendEx 29 '<>
.AppendEx 1, &quot;CAN&quot; 'string constant
.Commit
End With
ObjImpCat.Save
Set objDB = Nothing
Set objUser = Nothing
Set objFilter = Nothing
Set objImpCat = Nothing
Set objImpApp = Nothing
End Sub The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
 
Various ways....either write a macro to do this or base the filter on signon information to create a dynamic filter...see product documentation.

Macro is the most powerful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top