Here is a Cognos SDK example of getting a report parameter’s type.
You would have to generate a C# class object that makes your Cognos SDK method calls. From your entry method you will reference the getReportParameters() method.
………….
baseParameter[] param = CogSDK.getReportParameters( "/content/package[@name='GO Sales and Retailers']/folder[@name='Documentation Report Samples']/report[@name='Order Method Between List']", reportService );
foreach( parameter p in param )
{
Console.WriteLine( "Name: {0}, Type: {1}", p.name, p.type );
}
……….
public baseParameter[] getReportParameters( string reportPath, reportService1 c8RS )
{
searchPathSingleObject cmReportPath = new searchPathSingleObject();
cmReportPath.Value = reportPath;
asynchReply gpReply = c8RS.getParameters( cmReportPath, new parameterValue[] {}, new runOption[]{} );
if ((gpReply.status != asynchReplyStatusEnum.complete)
&& (gpReply.status != asynchReplyStatusEnum.conversationComplete) )
{
while ( (gpReply.status != asynchReplyStatusEnum.complete)
&& (gpReply.status != asynchReplyStatusEnum.conversationComplete) )
{
gpReply = c8RS.wait(gpReply.primaryRequest,new parameterValue[] {}, new option[] {});
}
}
if (gpReply.details == null)
{
return null;
}
for (int i = 0; i < gpReply.details.Length; i++)
{
if (gpReply.details[i] is asynchDetailParameters)
{
return ((asynchDetailParameters)gpReply.details[i]).parameters;
}
}
return null;
}