Creating a SharePoint Lists Report Using Crystal Reports with Web Services
page 4 of 5
by Eric Landes
Feedback
Average Rating: 
Views (Total / Last 10 Days): 35870/ 43

Creating the Crystal Report

In the crystal report to create the report, we start out with the report wizard.  For a data connection, choose Create New Connection, ADO.NET.  Once you select that you will be prompted for the location of your class library wrapper.  Using the File Path ellipses prompt, find and put the location of your DLL into the connection information or you can just cut and paste it in (see Figure 1).

Figure 1

Also specify the Class name (this should show up in the drop down) and then specify using the dataset from class.  This should be the wrapper method you set up that returns a dataset.  The code would be something like in Listing 2.

Listing 2

 
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
 
namespace WrapperCrystalXIWebService
{
  public class Class1
  {
    public DataSet ReturnWS_Info(String strUrl)
    {
      DataSet dsToReturn = new DataSet("WebService");
      WS_MySharepointWS wsSP_WebService = new WS_MySharepointWS();
      // Populate the Dataset from Webservice Results here
      return dsToReturn;
     }
  }
}

This code in ReturnWS_Info should populate your dataset with the data returned from the web service.  Then simply return the dataset and Crystal XI will interpret the results into a familiar Grouping like you would see from a SQL query.

From here using the field explorer, you can place your fields on different bands in the designer create groupings and other features you have come to expect from Crystal.  You will want to designate a default parameter to your datasource or you will get prompted many different times when trying to view the data or the fields.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 



Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-20 4:17:13 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search