Showing posts with label available. Show all posts
Showing posts with label available. Show all posts

Sunday, March 11, 2012

Controlling export formats based on user role

I'm using Reporting Services 2000 and I have a situation where I need to specify the file formats available to export. I know I can change the RSReportServer.config file to change these at a global level, but what I really need is to be able to configure these differently for different user groups. For example:

group 1 - has all available export formats available

group 2 - only has the ability to export to excel

group 3 - has no option to export to any format.

Is there a way for this to be done? If so, can anybody give me any pointers on how it can be done?

Any help given will be most appreciated!!

In Report Manager there is no way to limit export formats by role.

You would need to create a custom application to host the reporting services control, and limit your users in this way.

cheers,

Andrew

|||

ok thanks I thought this might be the case but just wondered if any simpler solutions were about.

Thanks again for your reply

Wednesday, March 7, 2012

Context Class in AS 2005 Stored Procedure

We are trying to use the CurrentTuple property of the Context Class available in the assembly Microsoft.AnalysisServices.AdomdServer. The CurrentTuple property is documented in the standard AS2005 doc (see http://msdn2.microsoft.com/en-US/library/ms175329.aspx). However this seems not available in the class definition. The only property available are

public static CultureInfo ClientCultureInfo

public static CubeCollection Cubes

public static CubeDef CurrentCube

public static string CurrentDatabaseName

public static MiningModel CurrentMiningModel

public static string CurrentServerID

public static bool ExecuteForPrepare

public static MiningModelCollection MiningModels

public static MiningServiceCollection MiningServices

public static MiningStructureCollection MiningStructures

public static int Pass

Any suggestion?

Thanks a lot.

Riccardo

Hi Riccardo,

Looks like there are inconsistencies in BOL documentation - the link below doesn't list CurrentTuple. But this entry in Chris Webb's blog may help - it shows how to find the current member on each attribute hierarchy of the CurrentCube:

http://spaces.msn.com/cwebbbi/blog/cns!7B84B0F2C239489A!586.entry

>>

The first problem I tried to solve was this: how do you return the name of the currentmember on all dimensions in your cube in a query?

>>

http://msdn2.microsoft.com/en-us/library/microsoft.analysisservices.adomdserver.context_members.aspx

>>

Context Members

Provides the execution context for the stored procedure.

The following tables list the members exposed by the Context type.

Public Properties

Name Description ClientCultureInfo Gets the culture for the current client. Cubes Gets a collection of cubes that are available in the current database or context. CurrentCube Gets the current cube. CurrentDatabaseName Gets the current database name for the current session. CurrentMiningModel Gets the current mining model. CurrentServerID Gets the server identifier (server\instance) for the current session. ExecuteForPrepare Gets a value that indicates whether the stored procedure is being called for preparation purposes. MiningModels Gets the mining models in the current database. MiningServices Gets the mining services in the current database. MiningStructures Gets the mining structures in the current database. Pass

Gets the pass number that the user-defined function (UDF) or stored procedure is running under.

>>

|||

Thanks a lot, Deepak.

Riccardo

Friday, February 10, 2012

Consolidation - Changing replicated data in a central subscribing site

Hi all,

I am new to replication and have a few questions.

1) Are there any "hooks" available to insert processing when a subscriber is about to copy data from a replicating site?

2) Is it possible for a subscriber to change only his local copy of the data - without replicating the changes back to the publisher?

I realise that once the data changes in one place it isn't really replicated anymore, and I realise that my limited knowledge of the subject might well mean I'm not even asking the right questions. Therefore, I shall try to describe as best I can my scenario.

I wish to use many servers for transactional input (to distribute the workload) and use replication to publish the inputted data to a subscribing central site. One of the tables I wish to replicate has an identity column as primary key, but the records should otherwise be unique - i.e. no two records should differ only in the value of the key. Another table, which should also be replicated, uses this id value as a foreign key.

I can use the identity increment and seed to guarantee no key violations will occur when copying data to the central server. However, there is another issue: Several servers can create the same record but with different id values.

I need to "merge" such records by deleting duplicate entries in the table with the identifier as primary key, and update the foreign keys correspondingly. To clarify (I hope!), here's an example of what data I might have on the central site after copying data from two input sites:

TRANSACTION table

amount = 200, metadata_id = 1001 // Replicated from server INPUT_1

amount = -117, metadata_id = 2001 // Replicated from server INPUT_2

METADATA table:

id=1001 Actitiy=Sales, Country=USA

id=2001 Activity=Sales, Country=USA

What I would like is basically for the central site to identify that metadata 2001 is really the same as metadata 1001, update the foreign key in the TRANSACTION record accordingly and not import (or delete, if this "merging" is done in a post-treatment) the duplicate metadata record.

If anyone can offer any advice on how to achieve this I would appreciate your input.

Hi,

Do you use transactional replication and merge replication? For transactional replication, you can use @.ins_cmd parameter in sp_addarticle to create your custom insert stored procs. For details, you can refer to the following documents: http://msdn2.microsoft.com/en-us/library/ms152489.aspx. For readonly transactional replication, the replication is one way and the changes won't be relayed back to the publisher.

Peng

|||

Hi,

Thank you for your response. We're not actually using any kind of replication yet, merely planning to do so. But it seems from what you're saying that "readonly transactional replication" fits the bill nicely.

Cheers,

Dag

Consolidation - Changing replicated data in a central subscribing site

Hi all,

I am new to replication and have a few questions.

1) Are there any "hooks" available to insert processing when a subscriber is about to copy data from a replicating site?

2) Is it possible for a subscriber to change only his local copy of the data - without replicating the changes back to the publisher?

I realise that once the data changes in one place it isn't really replicated anymore, and I realise that my limited knowledge of the subject might well mean I'm not even asking the right questions. Therefore, I shall try to describe as best I can my scenario.

I wish to use many servers for transactional input (to distribute the workload) and use replication to publish the inputted data to a subscribing central site. One of the tables I wish to replicate has an identity column as primary key, but the records should otherwise be unique - i.e. no two records should differ only in the value of the key. Another table, which should also be replicated, uses this id value as a foreign key.

I can use the identity increment and seed to guarantee no key violations will occur when copying data to the central server. However, there is another issue: Several servers can create the same record but with different id values.

I need to "merge" such records by deleting duplicate entries in the table with the identifier as primary key, and update the foreign keys correspondingly. To clarify (I hope!), here's an example of what data I might have on the central site after copying data from two input sites:

TRANSACTION table

amount = 200, metadata_id = 1001 // Replicated from server INPUT_1

amount = -117, metadata_id = 2001 // Replicated from server INPUT_2

METADATA table:

id=1001 Actitiy=Sales, Country=USA

id=2001 Activity=Sales, Country=USA

What I would like is basically for the central site to identify that metadata 2001 is really the same as metadata 1001, update the foreign key in the TRANSACTION record accordingly and not import (or delete, if this "merging" is done in a post-treatment) the duplicate metadata record.

If anyone can offer any advice on how to achieve this I would appreciate your input.

Hi,

Do you use transactional replication and merge replication? For transactional replication, you can use @.ins_cmd parameter in sp_addarticle to create your custom insert stored procs. For details, you can refer to the following documents: http://msdn2.microsoft.com/en-us/library/ms152489.aspx. For readonly transactional replication, the replication is one way and the changes won't be relayed back to the publisher.

Peng

|||

Hi,

Thank you for your response. We're not actually using any kind of replication yet, merely planning to do so. But it seems from what you're saying that "readonly transactional replication" fits the bill nicely.

Cheers,

Dag