Assuming you're using CR XI r2, you can go to the Business Objects Developer Library at http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm to find documentation for the Viewer SDK along with some sample code.
If you're using another version of XI, click on the "Developer Library Versions" link to get to a list of what's available.
-Dell