C# .NET Samples

Read the csharp_sample_name_Explain.html file before you run any of the C# .NET samples. These files provide instructions about running the sample programs, and contain information about associated files. They are located in installation_location/sdk/csharp/sample_name.

In addition, the source files contain comments to help you follow the sequence, and understand what each sample does. We recommend that you become familiar with programming techniques before you modify any of the samples.

The C# .NET samples include executable programs, located in installation_location/sdk/csharp/bin. If you receive an automation error when you launch an .exe program, you must recompile the program for your environment.

The C# .NET samples include the following applications

  • AddReport

    This sample demonstrates how to add a report to the content store based on an existing report specification.

  • Cancel

    This sample cancels a running report.

  • Capabilities

    This sample removes the Administration capability from the user running the sample.

    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 location specified by the search option.

  • CMTester

    This sample tests whether the content store is operational.

  • ContentStoreExplorer

    This sample displays all the objects in the content store.

  • Copy

    This sample copies an object in the content store.

  • CreateDrillThroughTarget

    This sample creates a drillthrough target.

  • CreateReport

    This sample creates a report.

  • DeleteReport

    This sample deletes a report that you specify.

  • Email

    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.

  • ExecuteReport

    This sample contains methods for executing different types of reports.

  • Move

    This sample moves an object in the content store.

  • Permissions

    This sample denies the current user read permission to that user's MyFolders folder.

    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.

  • ReportParameters

    This sample gets or retrieves parameters associated with the specified report.

  • reportrunner

    This sample runs a report that you specify, and produces results that are saved in HTML format.

  • 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.

  • Save

    This sample runs a report that you specify, and saves the output or allows you to save it with a new name.

  • Schedule

    This sample creates a new schedule for a report.

  • 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.

    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.

  • ViewAll

    This sample displays a list of all packages, reports, and queries in the content store.

  • ViewPackages

    This sample displays a list of all packages in the content store.

  • ViewReports

    This sample displays a list of all reports, and queries in the content store.

This list is also available in the file installation_location/sdk/csharp/CSharpSamples.html, which includes links to the explanation files for the samples.