Our use of cookies

We use cookies to tailor your experience, gather analytics, and provide you with live assitance. By clicking "Accept" or continuing to browse our site you agree to the use of cookies. For more details please read our Cookie Policy.

Building a SAP Crystal Report with SharePoint list data: How To

When it comes to a reporting solution, Crystal Reports is the de facto standard in the reporting world.

In this blog we will cover how we can generate a Crystal report based on data from a SharePoint List. To do this we will first export the data from the SharePoint list to SQL Server using SQList. Once the data is exported in SQL Server, we will use Crystal Reports to create reports using the exported data. The data export process from SharePoint lists to SQL Server can be configured to be either a continuous process or an On-demand one. So, you can choose either from them depending whether you want the generated reports to be in sync as any point of time or only at specific time.

There will be two steps for us to get the end result. Let’s start with the first step that is syncing the data between SharePoint lists to SQL Server.

You will need a copy of our SQList which you can download a trial from here

Step 1: Export the SharePoint List data to SQL Server table

Launch the SQList Manager. If you haven’t set up a replication yet, your default screen would look like as below. In case, if you had already set up replication before and you would like to use that data for generating a report in Crystal Reports, you can skip the Step 1 and move to Step 2. Otherwise, you can follow along the Step 1.

Click on ‘New replication’ button in the manager. We will be setting up a replication from scratch. As soon as you opt for creating a new replication, SQList Manager will take you through a step by step wizard for setting up a replication.

The first step for you will be to specify the details of the SharePoint Connection. The main details of a SharePoint connection include:

  • Site Name: It is the user friendly name of the connection which you will use to refer the connection.
  • Site URL: It is the URL of source SharePoint Site. It is important to note that it is the URL of the main sites not the URL pointing to a specific list or library.
  • Authentication Mode: Type of authentication the SharePoint Site is using.
  • Credentials: User name and Password of the legitimate user.

Once you have provided the connection details, you can test the connection and save it for further use and click on Next button.

Select the type of replication you would like to perform, whether you want to like to replicate specific list or specific set of lists to be replicated in database. Other available option is to export the entire list connection that matches a specific name.

From the perspective of our blog, we will opt for the first option where we will export a specific list which contains the data for report generation.

As soon as you click, you are presented with a view where you can select a single or multiple lists to export. If you need to make some modification relevant to export, you can perform that with the help of options present in the right corner. We have selected the “Employee Salary” list for the purpose the blog.

Now as you have set up the SharePoint Connection, the next step will be to set up the SQL Connection. You need to provide the basic details related to SQL connection like

  • Connection Name: You need to specify the name for the connection.
  • Server Name: You need to specify the SQL server instance name.
  • Database Name: You need to specify the name of the database where the exported data will be saved.
  • Database Engine: You need to specify the database engine version whether it is SQL server 2008 or which other version
  • Authentication Mode and credentials: Lastly you need to specify the authentication mode to be used to connect to SQL server and the appropriate credentials (User Name and Password).

Replication set up is almost complete. You need to specify the behavior of this replication as in whether you want to start this replication as soon as you click on finish or you want to start this later. Also, you need to specify whether you want to enable the replication. For the purpose of the blog, we will check both the properties.

As soon as you click “Finish”, the replication set up is complete and the replication of the SharePoint list gets commenced. You can always check the status or logs of the replication in the service status.

For reference purpose, let’s check out the structure and data of the list that we have exported. Employee Salary list contains compensation data of employees.

Step 2: Create Report using Crystal Reports

Now as we have replicated our data in SQL Server, then we can use the imported data and generate a sample report (Chart) using this data

Let’s launch the Crystal Reports app. For the purpose of blog, I am using version Crystal Reports 2016 which is the latest version when writing this blog but the same can achieved with any previous version as well.

The start page of Crystal Reports provides you with a bunch of options to create a new report.

  • Create a Blank Report
  • Use a Report Wizard to create a report
  • Cross Tab report wizard
  • Mailing label report wizard
  • OLAP Cube Report Wizard

We will go with the second option and use a step by step wizard to create a report.

Now Click on the “Report Wizard”. Once you click on it, the wizard will open and show you the list of existing connections. It also provides you with the option to create a new connection.

As we don’t have any existing connection, the list is empty for us. You can expand the option to create a new connection.

Once you expand the options to create a new connection, you can see that Crystal Reports provides you with ways to connect to almost any type of data source. You can see that the range varies from files (like XML), SAP stores, Access and Excel and others.

We have our data residing in the report database of SQL Server instance so we will select the OLE DB (ADO) option to connect to SQL Server.

OLE DB defines a set of COM interfaces to provide applications with uniform access to data that is stored in diverse information sources. This approach allows a data source to share its data through the interfaces that support the amount of DBMS functionality appropriate to the data source. For our case, SQL Server is the information source.

OLE DB Provider provides you with lot of options to choose from. Since we have to connect to SQL Server, we will select SQL Server Native Client 11.0 and then click “Next”.

Now you need to specify the SQL Server instance details which will be used to connect to SQL Server. You need to provide the server name, the type of authentication and the source database.

We will be using the windows authentication (Integrated Security) to connect to SQL Server. Once you provide the details, click on Next.

The next step involves configuration changes for advanced settings. If you need to override any settings like time out but we will not change any value and click on Finish.

As soon as you click on Finish, the connection set up is complete. You can see that a new connection will appear under OLE DB (ADO) connections, you can drill down it to select the relevant table ( EmployeeList.EmployeeSalary). Select the table and with the help of arrow button, move it to selected tables pane.

Click on Next to continue.

Now you need to select the fields from the table. We will be plotting a chart of employees against their respective salary. Hence, select the employee name and salary fields and move them into selected fields pane.

Click on Next to continue. If we want to group data we can do it at this stage. Since this is salary data we won’t do this.

Click Next to continue. Next we need to specify subset or filtering on the basis of the columns, if any. For this report we will leave this blank.

The next and final step is to select a template. We will select the Block (blue) template for blog and then click on finish.

As soon as you click on finish, the report will be generated.

So, the report creation is complete and you can save the report for further use. We have chosen a very basic use case for the purpose of the blog but it can be extended a lot further depending upon the requirement, whether you want to export huge chunks of data residing in different lists (supported by SQList). Even if you want to generate a complex report with data coming from different tables is easily feasible from Crystal Reports prospect.

Latest articles

AxioWorks Newsletter November 2022: Is it almost Xmas already?

29 Nov 2022

Hello Reader, Welcome to the November issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

Future of SharePoint in the world of Power Platform

29 Nov 2022

Microsoft SharePoint has been the driving force for enabling virtual team collaboration and the modern workspace revolution over the last three […]
[read article]

Power Pages: A website builder like no other 

31 Oct 2022

There is no denying the fact that low-code/no-code software development tools have gained a significant market segment of software development and […]
[read article]

AxioWorks Newsletter October 2022: It’s been a while!

26 Oct 2022

Hello Reader, Welcome to the October issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

AxioWorks SQList is now available online

27 Sep 2022

We have launched SQList Online! The cloud-based software as a service (SaaS) version of SQList, our on-prem application that makes it extremely easy […]
[read article]

MS Purview : One-Stop-Shop for data governance across your data estate

30 Aug 2022

Every organization utilizes various sources of data often scattered across cloud and on-premises systems. Over time, these data sources continue to […]
[read article]

DevOps in the world of Power Platform using GitHub Actions

31 Jul 2022

DevOps plays a vital role in the success of any software development project but when it comes to building low-code/no-code solutions it is often […]
[read article]

Build your Apps in MS Teams with MS Dataverse for Teams

27 Jun 2022

MS Teams has become one of the most widely used tools for team collaboration and communication in organizations using Microsoft echo-system for […]
[read article]

Dataverse: A one-stop-shop for your App data storage and management

24 May 2022

Data is at the centre of any business application development and is often the deciding factor for which tech. stack to be used for the development. […]
[read article]

AxioWorks Newsletter April 2022: Still working on the next release of SQList…

30 Apr 2022

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

Get SharePoint and SQL news to your inbox

Stay up-to-date with industry news and trends, SQL and SharePoint innovations and all the latest from AxioWorks by subscribing to our monthly newsletter.

Subscribe to the AxioWorks newsletter

*