ActiveReports 9 > ActiveReports User Guide > Samples and Walkthroughs > Walkthroughs > Common Walkthroughs > Web > DataSet Web Service |
With ASP.NET, you can set up a Web Service that returns a dataset to use in ActiveReports. This walkthrough illustrates how to create one.
This walkthrough is split into the following activities:
Note: For the information on how to connect your report to data and how to create the report layout, please see Single Layout Reports (for a page report) or Basic Data Bound Reports (for a section report). |
To create an ASP.NET Web Service project
To create the Web Method
In the App_Code/Service.vb or Service.cs file that displays by default, replace the existing <WebMethod()> _ and HelloWorld function with code like the following.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste OVER the existing WebMethod. |
Copy Code
|
---|---|
Private connString As String <WebMethod(Description:="Returns a DataSet containing all Products")> _ Public Function GetProduct() As Data.DataSet connString = "Provider=Microsoft.Jet.OLEDB.4.0; |
To write the code in C#
C# code. Paste OVER the existing WebMethod. |
Copy Code
|
---|---|
private static string connString = "Provider=Microsoft.Jet.OLEDB.4.0; |
To test the Web Service
To publish the Web Service
Note: Get the SiteName from the Internet Information Services Manager. |
To check the configuration in IIS
For information on consuming the DataSet Web Service in an ActiveReport, see DataSet Windows Application.