Create a Web service based on an existing report file

Source: Internet
Author: User
Web|web Services | Creating a Web service can be accessed by multiple different users, what about the report (reporting)? Crystal reports has become the de facto reporting standard in visual Studio, and it is now possible to convert report files to Web services through Visual Studio.NET. You can then send reports to users within or outside the enterprise by accessing these Web services. In this article, we'll look at how to create a Web service based on an existing report file. In the second part of this article, we will analyze how to use the Web services that you create.



Note: In this tutorial we will use Visual Studio.NET 2003. Before you begin your study, check that you have installed Visual Studio and all the Crystal reports components, including the Crystal Web services option.

Open Visual Studio and choose File > New > Project from the Start menu to create a new ASP.net Web application. In this case, we name this item "Reportservice".

After you create the project, you need to create or add an existing crystal, which we will later convert to a Web service. If you do not have a report file, you can use the sample report published with Visual Studio, located in C:Program filesmicrosoft Visual Studio. NET 2003Crystal Reportssamplesreports. In this case, we'll use "World Sales report.rpt" in the General Business sample folder.

To add an existing report to your project, you can select Project > Add Existing Item, and then change the Drop-down list at the bottom of the dialog box to Crystal Reports and select the report file you want to add.

Next, select the report in Solution Explorer, and then right-click the report directly. The "Publish as Web Service" option appears in the right-click menu. Selecting this option will produce an ASMX file that you can view by right-clicking the file (in this case, "World Sales reportservice.asmx") and selecting "View in Browser".

This preview shows all the actions that are allowed for the Web service, including:

Drillgraph

Refresh

FindText

GetPage

Gettotaller

Testreport

Getgroupleveldata

Findgroup

Getlastpagenumber

Getreportinfo

Export



There is also a link to the formal Web service definition written using the WSDL (Web Service Definition language, Web Services definitions Language).



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.