Buy the Cognos SDK Guide by BI Centre Now

The Cognos SDK Guide by BI Centre provides you with the complete source code for a C# web solution, C8.1 report based on the GOSR package, and a Word document that will serve as your core reference to understanding the Cognos 8 SDK. It will cover C8 SDK topics such as: authentication; querying the Cognos content store; rendering a C8 report in ASP.NET; exception handling; and much more.



Buy the Cognos 8 Modification Check Now







Monday, January 7, 2008

CognosSDK.cs -- Request Report Parameters

A Cognos Report Studio developer can design a report to apply specific filtering on a data item. For example, if a report developer wanted to only return all sale orders that occurred in the city of London then they could design a prompt page that allowed a user to select London as the city parameter item. The sales order query would be filtered based on the selected parameter value.

Knowing the parameters that exist in the report definition is a vital piece of information when executing Cognos Report Studio reports via the Cognos SDK. If the parameter collection is not satisfied then the report will maintain a state of prompting.

Here is a code example that shows the request for a report’s parameter collection. You should not that the report item is an input parameter contained in the search path for the report.

public asynchDetail[] GetParams(string packageName, string reportName, reportService1 rptService)
{
try
{
searchPathSingleObject spSingle = new searchPathSingleObject();
string _pkgName = packageName;
string _rptName = reportName;

spSingle.Value = "/content/package[@name='" + _pkgName + "']/report[@name='" + _rptName + "']";


asynchReply _resParameters = rptService.getParameters(spSingle, new parameterValue[]{},new option[]{});

asynchDetail[] _details = _resParameters.details;

return _details;
}

catch (Exception ex)
{
_ErrMsg = ex.Message.ToString();
return null;
}
}


Now that you have asynchDetail[] object you can access the report’s parameter collection information.

Cognos 8 SDK google search

Google

New C8 SDK Utility --- Cognos 8 Modification Check

The BI Centre C8 Modification Check provides a Cognos SDK developer with a workable C# solution that will allow you to:

· Search the Content Store for items that have been modified after a selected date value

For example, if you were looking for all reports that were modified on June 3rd, 2008 then you would select the date June 2nd, 2008. The code will search for all items that have been modified after the selected date value from the date control.

The results of the search are then rendered to a text box control.