Hello.

I have a problem in a Visual Basic 2010, when it sent data from a DataGridView to a report in Crystal Report (CrystalReportViewer), run the following error:

 

Could not load file or assembly 'file:///C:\Archivos de programa\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system can not find the file specified.

 

erro_cristalreport.jpg

 

The code I run is as follows:

        Dim Dt As New DataTable

        Dt = Me.DgListado.DataSource

        Dim Cr As New CrListado  

        Cr.SetDataSource(Dt)

        Dim R As New FrmRListado

        R.CrListado.ReportSource = Cr

        R.ShowDialog()

 

visual_basic.jpg

 

dotnet1 folder does not exist, there is only dotnet.

OS: Windows XP, Net Framework 4.0

 

I hope I can help, thank you very much.

If I put the question other way round then it may make sense to most of us, so let me put it that way – Why should I use Crystal Reports for Visual Studio 2010 with SAP BusinessObjects BI Platform 4.0 (BI4.0) products? Have any thoughts on this? If not, then surely you do not want to miss this.

 

 

 

Recently, I was upgrading one of my projects to use BI4.0 .NET SDK, which was introduced with SP02 as MSI (Windows Installer), as I mostly deal with Crystal Reports and RAS.  Installing MSI lead to a strange problem with my Visual Studio 2010 (VS), as it didn’t integrate the viewer, but fortunately VS already had Crystal Reports for Visual Studio 2010 (CRVS2010) integrated with it, so I was left to conclude that I can use CRVS2010 viewer for viewing the Crystal reports residing in the repository of BI4.0.

 

 

 

Though development machine showed good affinity with whatever it was using, until a point when I discovered that it’s not able to connect to RAS. With lot of troubleshooting and efforts, I finally discovered that CRVS2010 is no good for connecting to BI4.0. Another investigation revealed that BI 4.0 has Crystal reports viewer as well. Now as far as references are concerned I learnt that we can’t use assemblies or SDK of CRVS2010 for communicating with BI4.0.

 

 

 

Did this come as a shock? To me it was a shock as I was thinking CRVS2010 was meant to be used with BI4.0 as it was released much before BI4.0 and Crystal Reports 2011 doesn't contain So, what's up with CR 2011 and .NET SDK - actually, any SDK? so from where was I suppose to borrow the viewer control. Why can’t we use this combination?

 

Having learnt it hard way I found following as the reasons why the combination doesn't /shouldn't work:

 

 

 

  1. CRVS2010 isn’t meant for Enterprise products, though it comes with RAS (InProc RAS, there’s a huge difference between InProc and Managed RAS).
  2. Its missing SAP BusinessObjects Enterprise assemblies. For e.g. BusinessObjects.Enterprise.* and CrystalDecisions.Enterprise.xxx.
  3. Assembly versions are different. CRVS2010 (13.x) and BI 4.0(14.x). Mixing the references isn’t recommended (though sounds silly but is one of the important reasons).
  4. APIs have changed with every version. CRVS2010 may not understand CORBA communications.

 

 

Reasons could increase but I find above being the prominent. Now it calls for a conclusion, one simply shouldn't use CRVS2010 with any of the BI4.0 products. For e.g. SAP Crystal Server 2011, SAP Crystal Server 2011 OEM Edition and SAP BusinessObjects BI Platform 4.0.

 

Additional References:

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

This would look like a simple thing that most of us must have done someday, but installing it wrongly on development machine /web app server, could lead to many issues which might waste lot of productive time.

 

 

 

I would recommend installing the sdk from the original media. Most of us would say that we don’t have CDs, DVDs etc…  CDs and DVDs have taken back seat as installer is made available online in the form of *.iso or *.zip etc. Another question would be what is original media? To answer that I would say that the installation files/folder used to create BI Enterprise Server or install the entire product can be called as original media. The other way is to use the MSI Installer that is being offered by SAP to install SDK, which has improved since SP3 and SP4.

 

 

 

Original Media vs. MSI Installer

 

  1. Size of original media is above 1 GB & MSI Installer is merely 100MB or so.
  2. Original media can be used to create BI Enterprise Server, but MSI Installer does not provide this facility.

 

 

 

How to download the Original Media or MSI Installer from Service   Market Place (SMP)?

 

  1. Go to SAP Support Portal.
  2. Select Software Downloads> BusinessObjects Downloads.
  3. On the left hand side select SAP BusinessObjects Download> Browse the SAP BusinessObjects Portfolio.
  4. Click on Installation and Upgrade> SBOP Business Intelligence Platform (SBOP Enterprise).

 

Original Media:

Server

 

MSI Installer:

MsiInstaller

 

How to install .NET SDK from Original Media?

 

When you use the original media opt for custom install. You would see following:

ClientComponent

Select Client Component, you would see Developer Components as soon as you expand the node and unselect whatever is not required.

DeveloperComponent

 

Select whatever you want to install. Return to parent node and select Database Access. Installing everything is not required you can opt for 'Will be installed on local hard drive'.  With above, you have installed the .NET SDK on the machine.

 

 

Things to be cautioned about:

 

  1. Always install .NET SDK from the original media or MSI Installer.
  2. Patch level of BI Enterprise Server & Development machine should be same at any given point. For e.g. If BI Enterprise Server is on SP3 + FP 3.2 make sure that your SDK are also on SP3+ FP3.2.
  3. Use the service pack that is close to your current product level rather than going incremental. For e.g. install SP3 full and then apply FP 3.2 rather than applying SP1, SP2, SP3 and then FP3.2.

 

This begs the question "Why should I have the same patch level when it’s already working on my Dev/UAT/Pre-Production environment?"

 

I would simply say that system registries and assemblies are keeping well. But don’t blame on anything if suddenly things starts breaking. I have seen many issues with clientdoc.dll, crpe.dll, RAS Server has failed etc… Summarizing few reasons below

 

  1. To match every file SAP recommends to ensure that SDK is at same patch level as the Enterprise server
  2. With every patch programming interface changes slightly resulting changes in functionality in libraries and assembly files.
  3. At SAP, everything is tested at the same patch level; the behavior is not predictable when the mix runtimes come into picture.

   

For more references you can always log on to SMP and search for KB1501944, KB1441232, KB1364701 and KB1474553.

I ran into an issue for the first time today with a customer running 2 web applications that use our Enterprise .NET SDK on the same application server.

Checking the web server logs we noticed a ton of errors along the lines of:

assert failure: (.\infosessionmgr.cpp:357). (false : Cannot find an unused port between: xxxx - xxxx). Where xxxx was the same port number.

I found that customer had set the upper and lower request port in the registry to be the same port number.  Now this is fine if you want to control the number of ports that are open on your firewall and you have any applications using the SDK in the same app pool (or seperate app pools that dont each have their own process).  The same port would be used for all SDK communications and all is well.

What causes issues is when you have multiple Enterprise applications that are not in the same app pool and when each app pool is running under its own process.  That is exactly what this customers setup was.

The problem is that only one application can bind to a port at a time.  Since the applications were running under seperate processes, one was binding to the port which prevented the other from using it.

The way around this I could think of would be to either seperate the applications onto seperate servers or to open up the number of ports available to the SDK.

The customer had already decided to split the applications off onto seperate app servers so that should (hopefully) take care of the issue they are having.

Amazing that after all these years this is the first time I had run into something you would think would be much more common...

Good luck with your projects!

Customers who recycle their RAS servers periodically may notice that sometimes even though the RAS server is up and running per the CMC or the CCM that it will refuse a crystal reports job like it would if it were down.

There may be instances where the RAS server isn't quite ready to begin taking on report jobs and customers want to know this prior to sending actual jobs to the server from their custom app.

The following code checks the RAS server to verify that it is enabled, running, and ready to take on report jobs.

 

 

Check RAS Server

I hope this helps and good luck with your projects!

Jason

A customer had a large number of reports all scheduled to unmanaged disk.  The issue was that the OS account they were using to write to the disk drive was changing and they did not want to have to reschedule every report. 

The following code can be used to update the username and password on the recurring object itself so that it does not have to be rescheduled.

NOTE: This is completely unsupported to do and any issues you run into will not be supported by SAP support.  The official supported method of changing anything that has to do with a recurring instance is to reschedule the instance. Make sure you thoroughly test this before using it. You have been warned!

Update OS user account used for scheduling in VB.NET

Good luck with your projects!

The RAS SDK is very powerful and can be used to do almost anything you can do in the Crystal Reports designer.

Sometimes the naming of methods can be confusing, but overall it is not overly difficult to find what you are looking for (assuming it exists).

I had a customer looking to modify their report parameters prompt text as well as the descriptions of default values and was running into issues.

I will post the code I used, but there are 2 things that you need to know.

1)  The prompt text of a parameter is modified using the .Description off of the ParameterField object.  This is confusing since you use a .Description method off of the ParameterFieldDiscreteValue to change the default value description.  I wish it was .PromptText instead...oh well.

2) You can NOT modify dynamic parameter information..period.  Even trying to change the prompting text will result in an error stating that dynamic parameters can not be modified.

Here is the code I used to update the parameters prompt text and the descriptions of a couple default values of the parameter.

VB.NET sample code

 

I hope this helps!

Good luck with your project!

Jason

The code for working with Webi and Deski documents is essentially identical and alot of the same code is used when working with both objects, this includes things such as exporting.

One of the areas where they diverge is when you try and export an individual report from a document that contains more than one report.

For example, you have a webi document that contains 3 webi reports.  The code to export the 2nd report to pdf is as follows:

********************************************

IDocumentInstance boIDocumentInstance = boIReportEngine.OpenDocument(boInfoObjects[1].ID);
boIDocumentInstance.Refresh();

//Caste it to a IReport object and set the PaginationMode, this is mandatory
IReport rep = boIDocumentInstance.Reports[1];

//Export and stream to pdf
IBinaryView boIBinaryView = (IBinaryView)rep.GetView(OutputFormatType.Pdf);

Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "inline;filename=document.pdf");
boIBinaryView.WriteContent(Response.OutputStream);

********************************************

When trying to use this same code with a deski document you will get the error:

"The requested supported view is invalid.  Parameter: PDF"  which seems to make little sense since it says right there in the error that the view that is being requested is supported, but not valid...Ok..

So to accomplish the same with a deski document you have to manipulate the reports paginationmode.  By default the mode is Page which will not allow the export.  This needs to be changed to Listing to allow the export.

The code is just:

********************************************

IDocumentInstance boIDocumentInstance = boIReportEngine.OpenDocument(boInfoObjects[1].ID);
boIDocumentInstance.Refresh();

//Caste it to a IReport object and set the PaginationMode, this is mandatory
IReport rep = boIDocumentInstance.Reports[1];

//Added for Deski documents
rep.PaginationMode = PaginationMode.Listing;

//Export and stream to pdf
IBinaryView boIBinaryView = (IBinaryView)rep.GetView(OutputFormatType.Pdf);

Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "inline;filename=document.pdf");
boIBinaryView.WriteContent(Response.OutputStream);

********************************************

I hope this helps as I did not find anything documented on this and this simple line of code can save alot of headaches :)

Most of my blog posts have been created when I run into a customer issue that is fairly specific, rarely seen, or undocumented.  This one is no exception :)

My customer has a bunch of conditional hyperlinks that exist in subreports.  They all point to a specific server.  The problem is that if that server is shut down, dies, etc then they have all of these subreports with hyperlinks that will not work.  How can she modify these hyperlinks without having to do so by hand?

Using the RAS .NET SDK I was able to create a simple app that shows how to access these conditional hyperlinks and make whatever changes she needs.

The code is as follows:

RAS VB.NET

Good luck with your projects!!

Introduction

I’ve worked with OpenDocument and URL Reporting syntax for a few years now. Using the correct syntax for the URL’s parameters is the key to using these methods. I’ve linked some documents below that describe the syntax for both the OpenDocument method and the URL Reporting method.

Troubleshooting issues with OpenDocument or URL Reporting start with Notepad, a simplified URL, and a web browser. I’ve listed some common troubleshooting steps below as well.

The OpenDocument method uses URLs to link to Business Intelligence (BI) documents in a BusinessObjects Enterprise system. OpenDocument processes incoming URL requests for documents and any other viewable object type, and delivers the correct document to the end user making the request. This allows you to send users direct links to a document and avoid having them navigate through a folder hierarchy, as seen in InfoView.

URL Reporting is the older method for viewing objects in a Crystal Enterprise system. URL Reporting uses a request to Viewrpt.cwr to process viewable objects. This method is still available in BOE XI 3.x but only supports viewing Crystal reports.

The various documents linked in the Documentation section below show how to create URLs using OpenDocument syntax and URL Reporting syntax.

Troubleshooting Tips

The best tools for troubleshooting OpenDocument issues are Notepad and Internet Explorer. If a hyperlink is generating an error, or unexpected behavior you want to troubleshoot the URL to determine if it’s an issue with the URL, or an issue with the OpenDocument or URL Reporting web application.

I start by copying the URL that is having the issue into Notepad. I remove all the URL parameters except for the unique report identifier (e.g. the “iDocID” for OpenDoc, or “id” for URL Reporting). I copy this shortened URL directly into a browser and hit enter. The Enterprise system should then prompt for any needed information – like login credentials, or object specific parameters. Fill in the prompts and let the processing complete. Do you see the object you were trying to view? If so, this suggests there was an issue with the original syntax of your URL. If the object doesn’t view using the shortened URL this suggests an actual issue with the OpenDocument or URL Reporting web application.

If you are able to view the object by filling in the Enterprise prompts then you can start adding back one URL parameter at a time and rerunning it in the browser. As each additional URL parameter is added the prompting will change. If you try to pass a URL parameter and it is ignored then this is the parameter you want to focus on for syntax issues.

If the URL is generated from a custom application you want to take the application out of equation. Again, the first step is to test the URL in a browser after copying it from the application. Moving the URL to Notepad for testing allows you to see whether you’re dealing with a URL syntax issue or an issue with the OpenDocument application.

I typically start by looking at the following items:

  • Start with a basic URL that passes just the document ID. The report will prompt for everything else that it needs.
  • Start adding URL parameters one at a time and test the URL. As each URL parameter is added the report will prompt for less information. Continue adding URL parameters until the URL fails.
  • A URL parameter that is causing an issue will not work, or will not produce the desired results.
  • Check the syntax of the URL parameter.
  • Check the value being passed into the URL parameter.
  • Check the Crystal report or Webi document parameter in Crystal Reports or Webi to make sure the parameter name matches what is being used in the URL.

Logon Token Generation Code

If you want to integrate an OpenDocument URL into a custom application you can write code that creates a logon token so that your end users aren’t prompted to log into the Enterprise system. These links include sample code for generating a logon token at runtime in a custom application using one of the BusinessObjects Enterprise SDKs.

.NET SDK

Java SDK

COM / ASP SDK*

* NOTE: The COM SDK has been retired from BOE XI 3.x. The COM / ASP code in this note may continue to work in BOE 3.1, but it is not a supported method for generating a token with this version of the product. Developers are encouraged to migrate to the .NET or Java code for token generation.

Documentation

I have seen this question a couple times during my tenure here and it came up again today.

The customer was interested in finding the SI_ID of a recurring instance that he just created. When I inquired as to why he said he would like to be able to find the recurring instance and any instances that result from it.

There are a couple things that you need to know when trying to do this.

People have a misconception that a recurring instance is kind of like a parent object and that each time the instance is scheduled to run it creates "child" instances that are tied to it.  This is not the case. 

A recurring instance is just a pending instance that has the unique ability to create a new instance when it runs.  The result of this is that when you create a recurring instance the SI_ID of that recurring instance will end up being the SI_ID of the next instance it creates and NOT the SI_ID of the recurring instance through its lifetime.  This means that after each run the recurring object has a different SI_ID and nothing ties the recurring instance to the instances that resulted from it in the past.

In the BO Enterprise product as it currently sits there is no definitive way of finding which instances were created by a specific recurring instance. You can get a pretty good guess by looking at schedule times and such, but due to the potential volume of recurring instances and objects it would make it almost impossible to do easily.

I went over this with the customer (my thanks to Yuri Goron at APOS Systems!) and we discussed a way to get around this by using a custom property. This works quite well and in the following code I show how to accomplish this.

 

 

How to tie a recurring report with the resulting instances in VB.NET

When you use this method you can then query with something like

"Select si_name , si_mycustomproperty from ci_infoobjects where si_recurring = 1"

 to get the recurring instances and their custom property value.  You then query for

"Select * from ci_infoobjects where si_recurring = 0 and si_instance = 1 and si_mycustomproperty =  'the value from the previous query'"

This will return all of the instances that were created by the recurring instance.

I hope this was helpful and good luck with your projects!

Jason

I had a customer today that needed to find out what reports (webi and deski) on their Enterprise deployment that had become disconnected from their universe after a migration.

They were interested in writing a custom application to do this in .NET and after searching for forever thinking I had already written one I discovered that I had not...or at least had lost it if I had so off to writing I went.

This code just outputs the name of the object (it does not distinguish between webi or deski), the parent folder id, and the creation time of the object.

 

VB.NET Sample Code

<textarea cols="75" rows="10">

Imports CrystalDecisions.Enterprise

Partial Class _Default

    Inherits System.Web.UI.Page

 

    'Logon and Enterprise vars

    Dim ceSessionMgr As New SessionMgr()

    Dim ceSession As EnterpriseSession

    Dim ceService As EnterpriseService

    Dim ceInfoStore As InfoStore

    Dim ceInfoObjects As InfoObjects

    Dim ceInfoObject As InfoObject

 

    Dim boUniObject As InfoObject

    Dim boUniObjects As InfoObjects

 

    'Used to store query string

    Dim sQuery As String = ""

 

    Dim userid As String = "Administrator"      'Enter user name here

    Dim password As String = ""    'Enter password here

    Dim aps As String = "JEXIR2NET2k5"          'Enter APS name here

    Dim auth As String = "secEnterprise"

 

    Dim UniverseId As String

 

 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

        'Log on to the CMS

        ceSession = ceSessionMgr.Logon(userid, password, aps, auth)

        ceService = ceSession.GetService("", "InfoStore")

        ceInfoStore = New InfoStore(ceService)

 

        'Grab all Webi and Deski templates

        sQuery = "SELECT SI_Name, SI_PARENT_FOLDER, SI_CREATION_TIME, SI_Universe FROM CI_INFOOBJECTS WHERE (SI_Kind = 'Webi' or SI_Kind = 'FullClient')  and si_instance = 0"

        ceInfoObjects = ceInfoStore.Query(sQuery)

 

        Response.Write("<b>Webi and Deski documents with no Universe</b>" & "<BR><BR>")

        Response.Write("<table border=1 cellspacing=2>")

 

        Response.Write("<tr><td><b>Document Name</b></td>")

        Response.Write("<td><b>Folder ID</b></td>")

        Response.Write("<td><b>Creation Date</b></td></tr>")

 

 

        'Loop through the objects for the universe ids of webi docs

        For Each ceInfoObject In ceInfoObjects

 

            If ceInfoObject.Properties("SI_Universe").Properties("SI_TOTAL").Value.ToString = "0" Then

 

                'Output name of the doc

                Response.Write("<tr><td>" + ceInfoObject.Properties("SI_Name").ToString + " </td>")

                Response.Write("<td>" + ceInfoObject.Properties("SI_Parent_Folder").ToString + " </td>")

                Response.Write("<td>" + ceInfoObject.Properties("SI_CREATION_TIME").ToString + " </td></tr>")

 

            End If

        Next

    End Sub

End Class

 

</textarea>

Have a great day!

Today I had a customer who had a requirement to get the resultset from a Webi dataprovider in CSV.  He needed this so he would manipulate the data and use it in another part of the application.

Although this is possible in RENet and REBean, it is not possible in the Web Services SDK so I figured he was out of luck.

Luckily when discussing this with a coworker (the all knowing Ted Ueda) he mentioned that he saw that there was a ViewMode for ALL_DATA_PROVIDERS and DATA_PROVIDER, both of which return XML.  This was good news since the customer could then take the xml and parse it to get the same results.

I found that this is actually a minor change from a regular view sample and am attaching the code here.

VB.NET Web Services

 

Good luck!

Every so often a customer will ask about how export and stream a Crystal Report using the Enterprise SDK.  The typical answer was to use the RAS server (the reportclientdocument object) and the PrintOutput Controller. 

Once in a while a customer would come along and have a requirement to not use RAS and wanted to use the Page Server instead.  This was not a typical request, but it looked like it could be done.

Here is the code in VB.NET

 

 

Good luck on your projects!

Filter Blog

By author: By date:
By tag: