IBM Cognos Sample Programs
List of C# Sample Programs for IBM Cognos Software Development Kit
The sample files are installed in subdirectories under the installation_location/sdk/csharp directory. Each sample is in its own subdirectory. These subdirectories are as follows:
AddReport
This sample demonstrates how to add a report to the content store based on an existing report specification. The explanation file is AddReport/CSharp_AddReport_Explain.html
Cancel
This sample cancels a running report. The explanation file is Cancel/CSharp_Cancel_Explain.html.
Capabilities
This sample removes the Administration capability from the user running the sample. The explanation file is Capabilities/CSharp_Capabilities_Explain.html.
This directory contains the user interface for the Capabilities sample. The methods used by this sample are in the Security directory.
CMQuery
This sample gets the objects from the content store in the Folder/LOCATION specified by the search option. The explanation file is CMQuery/csharp_CMQuery_Explain.html.
CMTester
This sample tests whether the content store is operational. The explanation file is CMTester/csharp_CMTester_Explain.html.
ContentStoreExplorer
This sample displays all the objects in the content store. The explanation file is ContentStoreExplorer/csharp_CSExplorer_Explain.html.
Copy
This sample copies an object in the content store. The explanation file is Copy/CSharp_Copy_Explain.html.
CreateDrillThroughTarget
This sample creates a drillthrough target. The explanation file is CreateDrillThroughTarget/CSharp_CreateDrillThroughTarget_Explain.html.
CreateReport
This sample creates a report. The explanation file is CreateReport/CSharp_CreateReport_Explain.html.
DeleteReport
This sample deletes a report that you specify. The explanation file is DeleteReport/csharp_DeleteReport_Explain.html.
This sample demonstrates how to run a report and send the output as an email to a specific user. The IBM Cognos server must be configured with permissions to send email to a valid email server. For more information, see the Administration and Security Guide. The explanation file is Email/CSharp_Email_Explain.html.
ExecuteReport
This sample contains methods for executing different types of reports. The explanation file is ExecuteReport/CSharp_ExecReports_Explain.html.
Move
This sample moves an object in the content store. The explanation file is Move/CSharp_Move_Explain.html.
Permissions
This sample denies the current user read permission to that user's MyFolders folder. The explanation file is Permissions/CSharp_Permissions_Explain.html.
This directory contains the user interface for the Permissions sample. The methods used by this sample are in the Security directory.
PrintReport
This sample prints a report that you specify. You can also add entries to the list of printers, or remove existing ones from it. The explanation file is PrintReport/CSharp_PrintReport_Explain.html.
For information about setting up IBM Cognos services to use network printers on a Windows installation, see the Administration and Security Guide
ReportParameters
This sample gets or retrieves parameters associated with the specified report. The explanation file is ReportParameters/csharp_ReportParameters_Explain.html.
reportrunner
This sample runs a report that you specify, and produces results that are saved in HTML format.. The explanation file is reportrunner/csharp_reportrunner_Explain.html.
SamplesCommon
This sample includes many common classes that are used by the other C# .NET samples. It does not include a sample executable program, but instead builds a DLL that the other samples use. The explanation file is SamplesCommon/csharp_Common_Explain.html.
Save
This sample runs a report that you specify, and saves the output or allows you to save it with a new name. The explanation file is Save/CSharp_Save_Explain.html.
Schedule
This sample creates a new schedule for a report. The explanation file is Schedule/CSharp_Schedule_Explain.html.
Security
These samples allow you to perform a number of security related tasks, such as logging on to a secured namespace, logging off, and displaying the current logon information. If you are not logged on when you attempt to display your logon information, you will be prompted to log on. The explanation file is Security/CSharp_Security_Explain.html.
Although most of the samples will work when Anonymous access is enabled, they serve as more robust examples when a secured namespace is used.
Submit
This sample creates a new job and submits it. The explanation file is Submit/CSharp_Submit_Explain.html.
ViewAll
This sample displays a list of all packages, reports, and queries in the content store. The explanation file is ViewAll/csharp_ViewAll_Explain.html.
ViewPackages
This sample displays a list of all packages in the content store. The explanation file is ViewPackages/csharp_ViewPackages_Explain.html.
ViewReports
This sample displays a list of all reports, and queries in the content store. The explanation file is ViewReports/csharp_ViewReports_Explain.html.
Documentation
The IBM Cognos Software Development Kit Developer Guide contains additional information about the samples. See the chapter titled 'Methods' and the appendix titled 'Code Samples and Language-Specific Coding Practices'.
Please note that the samples are not intended to be treated as end-user applications. Refer to the sample code for examples of how to use the API when developing your own applications.