The BI 4 \ Crystal Reports Server 2011 SDK for VS 2010 has been released. Unfortunately, integrating the SDK into VS 2010 is not as simple a precess as one would hope. In this blog, I will describe how to integrate the SDK into VS 2010. I will also describe outstanding issues with the integration.

Before proceeding, please note;

1) The SDK installs runtime of version 14.0.2.336. You can not mix version 13.x Crystal Reports for Visual Studio 2010 and version 14 for BI runtime.

2) There is NO support for using the 13.0 assemblies when communicating with Crystal Reports Server 2011 or BI Platform 4.0 system.

Where to download the BI 4 CRS 2011 SDK

The SDK is available on the SAP Service Marketplace. Note that only the BI .NET SDK 4.0 msi installer is available. There are no merge modules. Keep in mind that this does require that you have a logon to the Service Marketplace. However, most Crystal Reports Server and Enterprise customers should have a support with the product. Steps to download the SDK:

1) Log in to the SAP Service Marketplace
2) Go to Installations and Upgrades
3) Go to the A-Z Index, then to C

4) Select SAP Crystal Server
5) Select SAP Crystal Server 2011
6) Select Installation and Upgrade
7) Select Windows
8) Find the SBOP BI Platform .NET SDK Runtime 4.0 SP2 Windows in the list, and download it:

 

For more information regarding SAP BusinessObjects BI Platform 4.0 .NET SDK see the following resources:

KB - 1648533 - How to install the SAP BusinessObjects BI Platform 4.0 .NET SDK on a development or production system?

Wiki - How to Install the BI Platform 4.0 .NET SDK on a Production, Staging or Test Server

Over the last couple of days I’ve taken a bit of time to see what this new Beta is all about. My first recommendation would be to read the following two blogs written by Blair Wheadon:

Crystal Reports for Visual Studio 2010 Beta Now Available
Crystal Reports in Visual Studio 2010

CR 2010 Beta can be downloaded from the following links.

Downloads US:
http://www.surveymonkey.com/s/CRVS2010US

Downloads rest of world:
http://www.surveymonkey.com/s/CRVS2010World 

The downloads are fast. Mine took about 4 minutes. An actual install took less than 7 minutes. Looking at the directory structure first. If the install went smoothly, you should see

c:program files(x86)SAP BusinessObjectsCrystal reports 14.0

with a number of subdirectories (ChartSupport, crystalreportviewers, dotnet, HelpFiles. The HelpFiles directory contains the files crnet_dg_2020.zip and crnet_api_2010.zip files. Here is where I ran into my first issue; they don’t work. See the below forum thread for issue description and temporary solution:
CRVS2010 Beta - VS2010 CR4VS2010 Help Content

Ok. On to my first project.

Firmly believing in the “KISS” paradigm, I figured the easiest thing to do will be to upgrade an existing application. Something as simple as can be. No viewer, no database logon, etc. Something like the sample app vbnet_win_exporttopdf available from here:

https://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples

Conversion went well with only two warnings re. CrystalDecision.Enterprise.Framework and CrystalDecision.Enterprise.Infostore assemblies. As these assemblies are not needed in the project I removed them. Checked that the CR viewer was on the form, run the app. Oops, an error:

 

 image

 

To make a long frustrating story short, here is what you need to do to avoid the above error. Once the app is upgraded to .NET 2010 and uses the CR 2010 assemblies, go to the app properties. Select the Compile tab and click on the “Advanced Compile Options…” button. Find “Target CPU” and set it to x86. Next find “Target Framework” and set it to .NET Framework 4. See the screen shot below.

 

image

 

And yes, the above is documented in the CR_Beta_Release_Notes_en.pdf, they just were not published when I started this training.

The app should run with no errors now.

Ok. So, let’s get real adventurous and create a new project with a CR viewer. No code, just a viewer on the form. Remembering the above steps, here is what you have to do:

Create a new empty project and save it. Go to the project properties and select the Compile tab. Click the “Advanced Compile Options…” button. Find “Target CPU” and set it to x86. Next find “Target Framework” and set it to .NET Framework 4. You can now go to the Toolbox and the CR viewer will be available. Note that without the above steps, you will not get the viewer in the Toolbox. Run the app and success, viewer on a form. Now, I added one line of code to run a saved data report;

CrystalReportViewer1.reportSource = “C:     estcr2010 eport1.rpt”

And, success. So, let’s try to upgrade an existing win app that uses the viewer. Following the above steps:

…project properties and select the Compile tab. Click the “Advanced Compile Options…” button. Find “Target CPU” and set it to x86. Next find “Target Framework” and set it to .NET Framework 4.

Running the project, results in the error:

"Could not load file or assembly 'BusinessObjects.Licensing.KeycodeDecoder, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException) Exception Message = "Could not load file or assembly 'BusinessObjects.Licensing.KeycodeDecoder, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.", Exception Type = "System.IO.FileNotFoundException"

And sure enough the assembly is nowhere to be found…

Rumour had it that this was not an issue with a C# app and indeed after ensuring the Trget Framework and Target CPU is set as per above, the C# sample win app cshart_win_dbviewer works fine. Ok. More testing with a VB app to see wht gives. But that's for day 2.

Update re. the above issue (May 6, 2010). Looks like this was some sort of a conversion issue. Deleting the project and re-oppening the old one resolved the error.

If you have questions regarding CR 2010, please post these to the SAP Crystal Reports, version for Visual Studio forum, making sure you read the sticky post Crystal Reports for Visual Studio 2010 Beta - read before posting before posting.

At the risk of demonstrating my intelligence or rather lack thereof, I'd like to document my experience while training on the BusinessObjects Enterprise XI R2  Web Services (WS) SDK. I found the errors typically thrown by the SDKs to be quite difficult to decipher. Perhaps this blog will save others from hours of slogging through these error messages.In a nut shell, my experience is that many of the errors I encountered were a result of incorrect or malformed URLs for the services I was trying to connect to.  In order to eliminate or reduce the possibility of incorrect or malformed URLs it would probably be a ‘best practice’ to return a URL from a service once the Session service object is created. I.e. to get the biplatform service use:session.GetAssociatedServiceURL(“BIPlatform”) which should return:  [http://<computer_name>:8080/dswsbobje/services/BIPlatform | http://<computer_name>:8080/dswsbobje/services/BIPlatform] This should prevent typographical errors and make it easier to move the application from development to test to production since you only have to change the url to the session service. Following is a number of error descriptions, where the error occurs, why it occurs and troubleshooting tips. Setting incorrect connection to the BOE web service at this line of code:
boConnection = New BusinessObjects.DSWS.Connection("http://lm-20-devbase:8080/dswsbobje/services/Session1")

 

 

 

Results in error on this line:
boSessionInfo = boSession.Login(boEnterpriseCredential)

 

 

 

The error is:
BusinessObjects.DSWS.DSWSException was unhandled by user code
CallStackTrace="   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)    at
*  .
  .
  .
*  CauseException="SoapException"
  CauseMessage="The http://scn.sap.com/people/ludek.uher/blog/2009/03/30/errors-with-businessobjects-enterprise-xi-r2-web-services-ws-sdk/action cannot be processed at the receiver."
  ID="S2"
  Message="Login exception (Error: WSE 99999)"
  Operation="[http://session.dsws.businessobjects.com/2007/06/01/Login | http://session.dsws.businessobjects.com/2007/06/01/Login]"
  Source="DSWS Web Service Consumer"
  WebServiceID=""

 

 

 

Resolution:
The connection object is incorrect and / or uses a malformed URL.  To test that the URL is valid, paste the URL into a browser and add “?wsdl”.

 

 

 

For example to testhttp://lm-20-devbase:8080/dswsbobje/services/Session1paste the URL into the browser ashttp://lm-20-devbase:8080/dswsbobje/services/Session1?wsdl. You should now be able to view the WSDL in the browser.

 

 

///////////////////////////////////////////////////////////////////////////////////////////

 

Setting incorrect BOE logon credentials:<br />boEnterpriseCredential = New BusinessObjects.DSWS.Session.EnterpriseCredential
boEnterpriseCredential.Login = "Administrator"
boEnterpriseCredential.Password = "Password123"
boEnterpriseCredential.Domain = "something"

 

 

 

Results in error on this line:
boSessionInfo = boSession.Login(boEnterpriseCredential)

 

 

 

The error is:<br />BusinessObjects.DSWS.DSWSException was unhandled by user code CallStackTrace="com.crystaldecisions.sdk.exception.SDKServerException: Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008)  cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2 detail:Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008)  The server supplied the following details: OCA_Abuse exception 10499 at http://scn.sap.com/people/ludek.uher/blog/2009/03/30/errors-with-businessobjects-enterprise-xi-r2-web-services-ws-sdk/.\exceptionmapper.cpp : 67  42040 {}  ...Enterprise authentication could not log you on. Please make sure your logon information is correct.

 

 

 

*Resolution:                                                                                To resolve this error, ensure that your logon credentials are correct. Recommend hard coding the values and try to use the same values when logging on to the CMC.</p><p> /////////////////////////////////////////////////////////////////////////////////////////// </p><p>Setting incorrect connection to the BOE web service BI Platform at this line of code:<br />boConnection = New BusinessObjects.DSWS.Connection("http://lm-20-devbase:8080/dswsbobje/services/BIPlatform1")</p><p>Results in error on this line:<br />boResponseHolder = boBIPlatform.Get(myQuery, Nothing)</p><p>The error is:<br />BusinessObjects.DSWS.DSWSException was unhandled by user code<br />CallStackTrace="   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)    at <br />  .
  .
  .
*  CauseException="SoapException"
  CauseMessage="The http://scn.sap.com/people/ludek.uher/blog/2009/03/30/errors-with-businessobjects-enterprise-xi-r2-web-services-ws-sdk/action cannot be processed at the receiver."
  ID="[http://biplatform.dsws.businessobjects.com/2007/06/01/Get | http://biplatform.dsws.businessobjects.com/2007/06/01/Get]"
  Message="Get exception (Error: WBP 99999)"
  Operation="[http://biplatform.dsws.businessobjects.com/2007/06/01/Get | http://biplatform.dsws.businessobjects.com/2007/06/01/Get]"
  Source="DSWS Web Service Consumer"
  WebServiceID=""

 

 

 

*Resolution:                                                                                Test the URL in a browser, and the url should be to the correct Web service that your are creating your Object instance for.  The error was on the line pointed out because the boBIPlatform object was not created properly.</p><p>  ///////////////////////////////////////////////////////////////////////////////////////////</p><p>Creating incorrect query as in the below query for the documents in a selected folder:<br />myQuery = "query://{Select SI_NAME From CI_INFOOBJECTS Where SI_Parent_CUIDx = '" + myFolderCUID + "' And SI_KIND In ('CrystalReport','FullClient','Webi')}"</p><p>Results in error in the code where you loop through the documents as on this line:
For myIndex = 0 To boInfoObjects.InfoObject.Length - 1</p><p>The error is:<br />System.NullReferenceException was unhandled by user code<br />Message="Object reference not set to an instance of an object."<br />Source="App_Web_u1oln9du"<br />StackTrace:<br />at WSSDK.ListDocuments_WS() in C:\SDKStudent\WS2WebSite\WSSDK.aspx.vb:line 150    at WSSDK.Button4_Click(Object sender, EventArgs e) in C:\SDKStudent\WS2WebSite\WSSDK.aspx.vb:line 529    at <br />  .
  .
  .</p><p>Resolution:                                                                                Use the QueryBuilder making sure it returns valid objects with no errors. The NullReference is due to the fact that the InfoObjects collection is empty, and thus it is not possible to iterate through it.</p><p>  ///////////////////////////////////////////////////////////////////////////////////////////</p><p>Setting incorrect connection to the BOE DSWS Connection as in this code:
boEngineConnection = New BusinessObjects.DSWS.Connection("http://lm-20-devbase:8080/dswsbobje/services/ReportEngine")</p><p><br />Results in error on this line:<br />boReportEngine = New BusinessObjects.DSWS.ReportEngine.ReportEngine(boEngineConnection, boSession.ConnectionState)</p><p>The error is:<br />BusinessObjects.DSWS.DSWSException was unhandled by user code<br />CallStackTrace="   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)    at System.Uri..ctor(String uriString)    at Microsoft.Web.Services3.WebServicesClientProtocol.set_Url(String value)    at <br />  .
  .
  .
CauseException="UriFormatException"<br />CauseMessage="Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed."<br />ID="[http://reportengine.dsws.businessobjects.com/2005/constructor | http://reportengine.dsws.businessobjects.com/2005/constructor]"<br />Message="constructor exception (Error: WRE 99999)"<br />Operation="[http://reportengine.dsws.businessobjects.com/2005/constructor | http://reportengine.dsws.businessobjects.com/2005/constructor]"<br />Source="DSWS Web Service Consumer"<br />WebServiceID=""</p><p>Resolution:                                                                                Test the URL in a browser, and the url should be to the correct Web service.<br /><br /> ///////////////////////////////////////////////////////////////////////////////////////////</p><p>An attempt to view an unscheduled report instance results in error on this line:
myReportCUID = boInfoObjects.InfoObject(0).CUID</p><p>The error is:
System.NullReferenceException was unhandled by user code<br />Message="Object reference not set to an instance of an object."<br />Source="App_Web_khollmby"<br />StackTrace:<br />at WSSDK.ViewDocumentInstance_WS(String myDocument) in C:\SDKStudent\WS2WebSite\WSSDK.aspx.vb:line 205    at <br />  .
  .
  .
Resolution:*
The actual cause here is the query did not return any infoobjects, so the collection is empty.  The best solution would be to test the query using QueryBuilder on the Enterprise system to verify that the query actually returns results.

Actions

Filter Blog

By author:
By date:
By tag: