crystal reports server sdks - cornerstone | sap

31
COPYRIGHT © 2008, BUSINESS OBJECTS S.A. Crystal Reports Server SDKs Robert Horne Product Manager Embedded BI and Developer Strategy

Upload: others

Post on 29-Nov-2021

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Crystal Reports Server SDKs - Cornerstone | SAP

COPYRIGHT © 2008, BUSINESS OBJECTS S.A.

Crystal Reports Server SDKs

Robert HorneProduct Manager Embedded BI andDeveloper Strategy

Page 2: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 2 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

AGENDA

1. Intelligence Platform2. Getting Started3. Logon and Single Sign On4. Working with Crystal Reports5. URL Reporting6. Q&A

Page 3: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 3 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Crystal Reports Server

The Intelligence Platform

Page 4: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 4 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

The XI 3.0 Business IntelligencePlatform

CR ServerNo Web

Intelligence

Page 5: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 5 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

The Business ObjectsBusiness Intelligence Portfolio

Reporting End-to-end BI Scalable, customized BI

Pric

e

$7K

$75K - $1M+

$20K - $100K

BusinessObjectsTM XI 3.0

Crystal Report Crystal Report Server

BusinessObjectsTM Edge Series 3.0

Page 6: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 6 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Understand Where Crystal ReportsServer Fits In

~100-200

CAL, Named

Packaged

Win/Linux

Single

Crystal ReportsServer

Offline analysis

Rapid Marts

Data Quality

Visual Analytics & Dashboards

Reporting

Ad hoc query & analysis

**Data integration

A la cartePackagedPackagedLicense model

Mobile

CPU, NamedCAL, NamedCAL, NamedLicense types

OLAP analysis

Unlimited~100-200~100-200Supported # of users

Win/Linux/UnixWin/LinuxWin/LinuxSupported platforms

Distributed deploymentfor load balancing

Clustering and failover

MultiSingleSingleServer deployment

BusinessObjectsEnterprise XI 3.0

BusinessObjects

Edge Series 3.0BusinessObjects

Edge SeriesCharacteristic

Page 7: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 7 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CAL: How does it work?

5 CALson 1 single server

Data 12

3

4

5

3

5 connected & active users

No connectedusers

Page 8: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 8 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Crystal Reports Server

Getting Started

Page 9: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 9 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CRYSTAL REPORTS SERVER ANDBUSINESS OBJECTS ENTERPRISE

Crystal Reports Server features are a subset ofBusinessObjects Enterprise Server featuresCrystal Reports Server and BusinessObjects share thesame platformThey also share SDKs and SDK documentation

Page 10: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 10 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Crystal Reports Server SDKs

Administration SDKAdminister security, users, groups, rights, and permissionsOrganize folders, reports, and objectsSchedule reportsManage calendars, events, categories, and other system objects

Viewers SDKEmbed the Viewer inside your web applicationHandles paging, drill down, and exporting

URL ReportingLink out to another application which handles the viewingexperience

Page 11: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 11 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

RESOURCES

Developer Library ( All XI 3.0 Documentation)https://boc.sdn.sap.com/developer/librarySee Setting up your Development EnvironmentCrystal Reports Server 2008 does not currently ship with .NETSDKs*. These will be available in an update to CR Server 2008

Sample Code Libraryhttps://boc.sdn.sap.com/codesamplesContains all the code samples from Business Objects

*As of October 2008

Page 12: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 12 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

BASICS

Viewing Crystal Reports1. Logon to the CMS2. Get an InfoStore object

1. To get access to any object you need and InfoStore object3. Query the InfoStore for the report you want4. Create a reportsource object from the report document5. Pass the reportsource to the Viewers SDK

Page 13: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 13 . COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CODE WALK THROUGH

IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon( username,password, cmsname, authType);

IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT TOP 1 * " +"FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_INSTANCE=0

AND SI_NAME='" + logonform.reportname[0] + "'" );

if (oInfoObjects.size() > 0) {//Retrieve the latest instance of the report

IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(0);

//Use the PS report factory to obtain a report source that will be processed on the Page Server.IReportSourceFactory factoryPS =

(IReportSourceFactory)enterpriseSession.getService("PSReportFactory");

Object reportSource = factoryPS.openReportSource((oInfoObject), Locale.ENGLISH);session.setAttribute("reportSource", reportSource);

//View the report in the standard DHTML viewer.response.sendRedirect("CrystalReportViewer.jsp");

Page 14: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 14 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

Crystal Reports Server

Logon and Single Sign On (SSO)

Page 15: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 15 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

LOGON

First thing you must do is logon to the serverBO XI provides 3 security plug-ins

EnterpriseLDAPWindows AD

*Single Sign On (SSO) is available with all three, plusone

Enterprise – Hack job where you by pass the InfoView logonpageLDAP – Use SiteMinder tokenWindows AD – Using Kerberos and Vintela LibrariesTrusted Authentication

* I use a liberal interpretation of SSO

Page 16: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 16 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO - CONCEPTS

For custom code SSO implementations you first need tofollow the setup for SSO found in the BusinessObjectsEnterprise XI 3.0 Administrators Guide.

You will find very specific setup steps for Java, LDAP,Win AD, CMC and configuration files. Do this first!

To help with trouble shooting ensure that InfoView SSOworks first before doing custom code trouble shooting.

Page 17: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 17 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – BY PASS INFOVIEW

Use this code to create your own SSO to InfoView for unsupportedauthentication systems.

IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon("<yourusername>", "<your password>", "<your Central Management Server name>", "<yourauthentication type>");

String logonToken = enterpriseSession.getLogonTokenMgr().createLogonToken();

/* URL to the InfoView logon page - Ensure that the URL to the Java InfoView's logonpage is correct. */

String infoViewURL ="http://myServer:8080InfoViewApp/logon/start.do?ivsLogonToken=" + logonToken;

/* URL request */

response.sendRedirect(infoViewURL);

Page 18: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 18 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – LDAP AND SITEMINDER

Retrieve SiteMinder token and place it in as theusernamePass a blank password

//Grab the SMS Session token from a cookie or request//See SiteMinder documentation for details

IEnterpriseSession enterpriseSession =CrystalEnterprise.getSessionMgr().logon(sms_session, "", "<your Central ManagementServer name>", “secLDAP");

Page 19: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 19 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – WIN AD AND VINTELACRYSTAL REPORTS SERVER 2008

Ensure you have this configured correctly for InfoViewbefore attemptingRequires jcsi*.jar and credential.JAR

Found in InfoViewApp lib directory….import com.businessobjects.sdk.credential.CredExtractorimport com.wedgetail.idm.sso.Ssoimport com.wedgetail.idm.sso.AuthInfoimport org.ietf.jgss.GSSCredentialimport org.ietf.jgss.GSSManager….CredExtractor credex = new CredExtractor(request);GSSCredential delCreds = credex.GetCredential();GSSManager manager = credex.GetManager();IEnterpriseSession enterpriseSession = null;enterpriseSession = CrystalEnterprise.getSessionMgr().logon(delCreds, manager,

apsname, apsauthtype);

*This code only works with Crystal Reports Server 2008

Page 20: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 20 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – TRUSTED AUTHENTICATION

Enables Single Sign On with Java Application ServersDelegate Authentication to third party authenticationsolutionsBased on trust between a single java application and theCrystal Reports ServerEnables the application to send user names withoutpasswordsSee Administrators Guide on how to setup trust betweenJava Server and CMS server

Page 21: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 21 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

SSO – TRUSTED AUTHENTICATION

ITrustedPrincipal trustedPrincipal;ISessionMgr sessionMgr =

CrystalEnterprise.getSessionMgr();

trustedPrincipal = sessionMgr.createTrustedPrincipal(userName, cmsName, (String)sharedSecret);

//or

trustedPrincipal = sessionMgr.createTrustedPrincipal(userName, cmsName );

Page 22: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 22 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CRYSTAL REPORTS SERVERSDKS

Working with Reports

Page 23: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 23 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

OPTIONS AVAILABLE

Schedule ReportsEnterprise SDK

Viewing ReportsViewers SDK (Embedded viewer)URL Reporting

CrystalReportsOpenDocument

Create or Modify ReportsReport Application Server SDK

Page 24: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 24 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

VIEWERS SDK

A series of Java objects that can be embedded in yourweb application which handle:

viewing,exporting,paging,drill downclient side printing.

You also need to deploy a set of html, js, and image filesin a folder called “crystalreportviewers”

Configure the web.xml to let the application know the location ofthe crystalreportviewers folder

Page 25: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 25 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

VIEWERS SDK CODE

CrystalReportViewer viewer = new CrystalReportViewer();

viewer.setName("CrystalReportViewer");viewer.setOwnPage(true);viewer.setDisplayToolbar(false);viewer.setPrintMode(CrPrintMode.ACTIVEX);

Object reportSource = session.getAttribute("reportSource");viewer.setReportSource(reportSource);viewer.processHttpRequest(request, response,

getServletConfig().getServletContext(), null);

Page 26: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 26 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

REPORT APPLICATION SERVER SDK

Used when wanting to modify reports at runtime beforeviewingCommon scenarios

Change database locationReplace existing data connection with a a runtime dataset(ResultSet) pushed from your applicationRemove or suppress a field depending on user rightsMake batch changes to a set of reportsCreate an online report creation or modification applicationExporting

Can be used to just view reports, but should only beused when a specific RAS workflow is needed

Page 27: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 27 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

RAS CODE

//Log in to Enterprise and get the report to modifyReportClientDocument oReportClientDocument =

myGeneric.getClientDoc("ResultsetDatasourceReport");

// Pass the ResultSet to the reportString table_name =

oReportClientDocument.getDatabase().getTables().getTable(0).getName();

oReportClientDocument.getDatabaseController().setDataSource(this.getResultSet(), table_name, "Reports");

session.setAttribute("CrystalReportViewer.ReportSource",oReportClientDocument.getReportSource());

response.sendRedirect("CrystalReportViewer.jsp");

Page 28: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 28 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

CRYSTAL REPORTS SERVER

URL Reporting

Page 29: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 29 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

URL REPORTING

Provides an easy way to view reports and documentsTwo URL formats available

URL reporting for Crystal Reports (when you are only viewing CrystalReports)

Need to deploy CrystalReports.warURL reporting with openDocument( Crystal Reports, WebIntelligence,DesktopIntelligence, OLAP intelligence)

Need to deploy OpenDocument.war, CrystalReports.war,AnalyticalReporting.war, and PlatformServices.war

LimitationYou need to deploy a separate web application for the URL reportingviewerDoesn’t share the same application space as your custom application

For more information see the “Viewers Java SDK Guide” in theDeveloper Library

Page 30: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 30 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

URL REPORTING EXAMPLE

//Obtain token so that user will not be challenged to enter logoncredentials

//Enterprise session. This token should not be released manually.String enterpriseToken =

enterpriseSession.getLogonTokenMgr().createLogonToken();

//Build openDocument.jsp URL reporting request.String URLrequest = "http://" + servername +":8080/OpenDocument/opendoc/openDocument.jsp?iDocID=" +docID + "&token=" + enterpriseToken;

//Launch URL request.response.sendRedirect(URLrequest);

Page 31: Crystal Reports Server SDKs - Cornerstone | SAP

SLIDE 31 COPYRIGHT © 2008 BUSINESS OBJECTS S.A.

QUESTIONS

?