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!

How to specify CubeSaveDirectory in C# application

Status
Not open for further replies.

smsaji

Programmer
Jun 26, 2005
91
CA
Hi,

Would like to know how to specify the CubeSaveDirectory in the c# program. Any help appreciated.

Currently the cube is created in the folder specified in the 'CubeSaveDirectory' variable of 'trnsfrmr.ini' file. But need to retrieve this path (from the database) for the selected '.mdl model file' in the application.

strModelPath = @"C:\Cognos\go_sales.mdl";
try
{
Type typeCognos = Type.GetTypeFromProgID("CognosTransformer.Application");
object objCognos = System.Activator.CreateInstance(typeCognos);

// Create the parameter list
object[] arguments = new object[] { strModelPath };
object[] argumentsMDC = new object[] {};

// Dynamically Invoke the Object
Object objresult = typeCognos.InvokeMember("OpenModel",
BindingFlags.InvokeMethod,null,objCognos,arguments);

Object resultMDC = typeCognos.InvokeMembe("CreateMDCFiles",
BindingFlags.InvokeMethod,null,objresult,argumentsMDC);


thanks
saj
 
Currently, the cube is created using following command. It is created in 'C:\Cognos'. This is specified in the trnsfrmr.ini file. Can I specify the CubeSaveDirectory folder in the c# program while creating the cube.

Object resultMDC = typeCognos.InvokeMembe("CreateMDCFiles",
BindingFlags.InvokeMethod,null,objresult,argumentsMDC);

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top