Home > Crystal Reports, SAP BusinessObjects, Semantic Layer > Crystal Reports and Web Services

Crystal Reports and Web Services

Quick Tutorial

Service Oriented Architectures are amazing.  Now more than ever companies are leveraging freely available web services to add value to their internal data.  One of the most common ways on combining data today is via Google Maps. A great example of this is housingmaps.comHousingmaps combines the power of Google Maps and CraigsList to allow you to view available housing in your area together with the power of Google Map navigation.

Today, all tools from SAP BusinessObjects can consume web services.  The most popular reporting tool in the BusinessObjects platform is Crystal Reports.  With the report creation wizard, we can be consuming a web service is seconds.  Let’s walk through it step by step.  We will connect to a web service that will provide us driving directions from Point A to Point B.

Step by Step

  1. Launch Crystal Reports 2008
  2. From the Start Page, choose Report wizard, this will launch the Standard Report Creation
  3. Next expand Create New Connection, and scroll down to XML and Web Services and expand the folder.
  4. The XML and Web Services data source  dialog box will appear.  Choose Use Web Service Data Source and choose Next>.
  5. In our case, we are going to use an HTTP Web Service, so choose Use HTTP(S) WSDL and type in:  http://www.ecubicle.net/driving.asmx?WSDL and choose Next>.
  6. This Web Service does not require a UserID/Password, so choose Next>.
  7. After a moment or two, the Web Service, Port and Method screen should appear.  You should see: driving, drivingSoap and GetDirections in the Service, Port and Method drop downs respectively.  (If this does not work, there may be a firewall issue at your location.  Check with your local IT.)  Choose Finish.
  8. After choosing Finish, you will see a ResultSet box under the http://www.ecubicle.net/ data source.  (You may need to expand it).  Move the box over to the Selected Tables side by choosing the [>] button.   When you do, you will be prompted to enter some parameters.  So far so good.
  9. There are four input parameters to this:
      fromAddress – the starting address, e.g. 3734 Elvis Presley Boulevard Memphis, TN 38186
      toAddress – the destination address, e.g. 1600 Pennsylvania Ave NW, Washington, DC 20500
      distanceUnit – miles or km, default: miles
      expresswayEnabled – true or false, default:true
  10. After entering the values choose OK.
  11. Complete the Wizard by either choosing Finished or by walking through the remaining screens.
  12. Once the fields are added to the report, you should the directs Elvis would need to take to drive to the White House.

Here is your finished report:

Leveraging Web Services from within SAP BusinessObjects couldn’t be easier.  If you are interested in seeing the same types of capabilities from within other BusinessObjects tools drop me a line and I’ll add it to the list.  Enjoy.

«Good BI»

  1. Kishore
    June 11th, 2009 at 07:44 | #1

    Hi David Taylor’s,

    Good job man. Go ahead and discover new things. All the BEST.

    Thanks

  2. Gene Hellums
    August 11th, 2009 at 08:49 | #2

    David, Thanks for this walkthru. I get all the way through the steps but in the last step to view the report I get an error:

    Cannot determine the queries necessary to get data for this report. Details: Cannot access web service. System.WebServices.Protocols.SoapException: Server was unable to process request, —> System.NullReferenceException: Object reference nto set to an instance of an object….(theres more.)

    Any Ideas?

  3. Suma
    August 21st, 2009 at 07:03 | #3

    This is great !

    Please post one for BO webi/deski report or even from the univese.

    Thanks

  4. August 23rd, 2009 at 21:21 | #4

    Okay Suma thanks for the suggestion. I can definitely do that. We can connect to Web Services via a Universe as well. For BusinessObjects XIr2, we created a new extension to the Universe called a “data feed as a universe”. There are more details here: https://www.sdn.sap.com/irj/boc/innovation-center?rid=/webcontent/uuid/50c178ec-15f2-2b10-65be-85fd40d6c001

    Now that we have Data Federator, you can also use that to connect to a web service. Then the Universe can talk to Data Federator via the JDBC/ODBC bridge.

  1. No trackbacks yet.