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

Cognos SDK 10 and C#

Started by libin13, 14 Aug 2013 12:24:10 PM

Previous topic - Next topic

libin13

Hi,

I'm a C# developer and a novice in Cognos,  I'm sorry if my following questions looks silly. I would be really grateful if someone can answer to my questions.

I'm asked to migrate a vb app to C# app using Cognos SDK. So for developing the code, is it enough I use/reference the two dlls cognosdotnet_2_0 and cognosdotnetassembly_2_0.dll in the C# project.   I have received the dlls from our cognos admin.

I'm trying to create a Forms/console application, not an web page. Therefore, to connect and logon to Cognos environment, which url should I use for Content Manger service? I've tried with both urls - 1) Dispatch url and 2)cognosapi.dll url.

I am struggling with these questions for a week. It'd be great if someone can point me in the right direction.

dew

#1
Hi.

For the URL you can build a string like below, and pass this to the contentManager service.

this.strURL = "http://" + serverIP + ":" + port + "/p2pd/servlet/dispatch"; 

i.e.  http://yourserver:9400/p2pd/servlet/dispatch

The cognos admin person will be able to give you the exact dispatcher URL for this. (its listed in Cognos Configuration)

For the DLLs, yes you only need those 2 files.

Hope this helps.

Dew

libin13

Thanks Drew. I was able to logon when using the url which ended like 'p2pd/cgi-bin/cognosisapi.dll'. However, they said there's no dispatcher URL. The Cognos admin said this would be our dispatcher URL.

I'm able to logon, now I'm facing this another issue. I'm able to run the query to see all the reports, however when I'm running/executing the report using parameters using Ays = CRN.run(reportpath, paramter[], runoptions) where ays is the object of asynch reply and crn of contentmanagerservice1, I'm getting the error of CM-REQ-4342 An error occurred with the client.

I tried running with object of reportservice and got the same error. Can you please advise on this?

deepakkarma

Hi,
I read your problem.I am facing the same issue about when using
asynchReply asynchRep = reportNet.run(reportPath, parameters, runOptions); 
error:
Inner Exception :
Message:Object cannot be stored in an array of this type.

I am currently using DotNet Framework 4.5 + cognos 10 + cognosdotnet_2_0.dll
I have search on google but not getting any solution.If you have any solution or trick ,please let me know it will be  gr8 help for me.
You can also send me a solution on my emailid deepakkarma@gmail.com
Thanks in Advance!