Professional.Crystal.Reports.for.Visual.Studio..NET [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional.Crystal.Reports.for.Visual.Studio..NET [Electronic resources] - نسخه متنی

David McAmis

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید



























XML Report Web Services Overview



In the past, there have been a number of different methods for sharing information between different companies or organizations. Over the years a number of standards and standard file formats have emerged, but each had its own unique strengths and weaknesses. EDI, for instance was created to exchange data between companies (usually for purchasing or other supply-chain related use) but the EDI format was exacting and cumbersome for developers to use in their applications.

If you have worked as a developer for long, chances are you have made your own ad hoc attempt at information exchange - through extracts, data interchange, database replication, and synchronization. While these methods may provide information to the people who need it, it is very time-consuming trying to impose some standards on these processes and the information itself.

Even when information was successfully shared between organizations, it was then a question of "What do we do with it now?" Often, another database instance would have to be created, transformation and loading routines developed and finally, another suite of reports would have to be created, resulting in duplication of effort between whoever owned the data and the organization they were sharing it with.

With the introduction of XML Web Services with Visual Studio .NET and in particular, XML Report Web Services provided by Crystal Reports.NET, some of these information sharing and integration problems can be solved.

In its most simple terms, an XML Web Service is a piece of code that provides a specific function (or set of functions) that can be shared between different development environments and applications. The fact that these services are based on common standards, like XML, SOAP, and HTML means that this technology can be leveraged across a number of different applications or uses.

Using an XML Web Service, you could encapsulate a snippet of code to process credit card transactions, for example, and compile this code to a Web Service. From that point, any number of different applications on different platforms, local and remote, could use that same Web Service and the functionality it provides.

The same concept applies to reports you may have developed - through the use of XML Report Web Services, a developer can create a feature-rich report that can be compiled and used (and reused) by information consumers and application developers without losing any of the inherent formatting or features.


What Are XML Report Web Services?


The simplest definition of an XML Report Web Service is that it is a report file that has been published as a web service, which can be consumed and viewed on any number of different platforms (including Windows and Web-based applications created with Visual Studio .NET or other tools).

During the publishing process, Visual Studio examines your report file, its content, the layout of the report, and which features are used when creating a Report Web Service from your report file. Visual Studio will create a DLL file and then take all of the attributes, including the data types for the fields you have selected, parameters, and resulting data types, and generate an XML file to describe these attributes.


When the Report Web Service is used or consumed, another special type of XML file is created, called a Web Service Description Language (.wsdl) file, as shown below.



Important

This particular web service ships with the sample code for this chapter and is built from the inventory report (inventory_report.rpt) also included in the sample files.

This file is written using Web Services Description Language, or WSDL. For applications and users that will access this Report Web Service, this file documents how they can interact with the service itself.

Normally, if you were an application developer creating a web service from scratch, you would develop most of these components yourself using the tools available within Visual Studio .NET and the .NET Framework. With XML Report Web Services, Crystal Reports does most of the work for you.


Note

If you are interested in creating other types of web services from scratch, find a copy of Professional ASP.NET 1.0 (either in book form or available on www.wroxbase.com) and check out Chapter 19: Exposing Web Services. This chapter also provides some good background information on web services and the different protocols used with them. You also may want to check out other titles from Wrox Press that specifically deal with Web Services, such as Professional ASP.NET Web Services and Professional XML Web Services.




How Would I Use an XML Report Web Service?


The most common scenario for using an XML Report Web Service is when you need to share a report or its content with another department or organization. One example of when this type of web service would be useful is managing the supply chain and inventory between a vendor and their customer.


To keep customers in the loop, a vendor could create a number of Crystal Reports that display all of the required information for backorders, shipped orders, and item availability. The vendor could then create XML Report Web Services from these reports and advertise the availability of these web services to their customers.

For larger customers who already have an intranet or other vehicle for display the content from these web services, their application developers could create a few simple pages to view the reports served up by the web services. Instead of having a report sent to them or viewing a report snapshot, they would actually have access to live data in their report, served directly from the vendor's data.

For smaller customers who don't have developers who can provide an interface to these web services, the vendor may choose to create their own application that gives these types of customer access to the reports available in the web services.

In either scenario, there is tremendous value to both the vendor and their customer - information is provided in real time, with no additional effort required to update a data mart, or produce and send reports or extracts. All of the manual effort required to deliver this type of solution in the past is no longer required.

In the following sections, we are going to walk through creating XML Report Web Services and applications that can consume them.



/ 115