cancel
Showing results for 
Search instead for 
Did you mean: 

change crystal reports password using java SDK

0 Kudos

Hi Friends,

   I am new to SAP Crystal reports. is it possible to do following things using java SDK?

  1. SDK code that can change the password (stored in CMC) for the Crystal Report...
  2. Build a CR with embedded password
  3. A webpage, that displays the CR (object) properties.. where password can be reset for the CR
  4. Manually change the password in the DSNs
  5. Run CR, the report should now run with the new password.


if so, give me some suggestions or sample code snippets Regarding this. Thanks for your help








Thanks

Jayan.M

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

It is possible to do everything except item 2 fairly easily using the SDK.  Are you using BusinessObjects or Crystal Reports Server, or are you trying to do this with just Crystal?  Sample code will depend on the answer to this question.

-Dell

0 Kudos

Hi Dell,

   Thanks for your reply. Reports are published in Business objects Enterprise and it stored in multiple folders.

Thanks & Regards

Jayan.M

DellSC
Active Contributor
0 Kudos

Ok, that makes it easier!

For each report that you want to update, you'll do the following to change the password:

1.  Query for the report which will be returned as an IInfoObject.

2.  Cast the IInfoObject as an IReport.

3.  Use IReport.getProcessingInfo() to get the IReportProcessingInfo for the report.

4.  Iterate through the list of IReportLogon in IReportProcessingInfo.getReportLogons().  You can also use this information to create the web page that allows the user to change the password.  Since there can be more than one IReportLogon, you'll want to make sure that you display all of them.

5.  Use IReportLogon.setPassword() to set the new password.

6.  Use IReport.save() to commit the changes back to the CMS.

You can find sample code by going here:  http://scn.sap.com/community/bi-platform/java-sdk.  Scroll down a bit and look for "Java Sample Applications" on the left of the page.  The samples are mostly for earlier versions of BO, but this part of the SDK hasn't changed much.

To display the report, you need to look at using OpenDocument, which uses a URL from your BusinessObjects system.  Assuming that you're on BO 4.1, 6ou can find the documentation for OpenDocument at SAP BusinessObjects Business Intelligence platform 4.1 – SAP Help Portal Page.  Click on "Development Information" and look for "Viewing Documents Using OpenDocument".

-Dell


0 Kudos

Hi Dell,

    Thanks for your suggestion. I hope it will help for my task

Thanks

Jayan.M