Posts

Showing posts from June, 2009

Synchronizing SharePoint Lists Between Internal and External Sites

Image
I have created a sample program to synchronize SharePoint lists between two sites. There are many ways to accomplish this task: 1. SharePoint List Event Handler (ItemAdded, ItemUpdated, ItemDeleted etc.) 2. Custom WorkFlow to copy list items when modified 3. Windows Form to Push Data Manually 4. Windows Service to schedule the move on scheduled times Here is the sample for the 3rd Approach [Windows Form to Push Data Manually]: In this approach. Create a C# Class Library Project and Add a reference to Microsoft.SharePoint.DLL from 12 Hive. Create 2 XML Files [Feature.XML, Elements.XML] to intall the feature. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Xml; using System.Net; namespace AMIMoverByWebService { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnSync_Click( object sender, EventArgs ...

How to Create SSRS Report on SharePoint List

Image
There is fairly an easy way to create a SSRS report on SharePoint List. By using an XML data source, we will get access to the SharePoint List. Then, create your own CAML query to manipulate SharePoint List Data. Here is the step by step example of creating SQL Reporting Services report on SharePoint List.   1. Create a Report Server Project in Visual Studio   2. Add a Data Source with following info types:   - Name : Should be the Data Source Name   - Type : XML   - Connection String : Should be the SharePoint Web Service for SharePoint List     [Example: http://myintranet/ts/FazlulsWorld/_vti_bin/lists.asmx ]   - Credentials: Windows Authentication or choose appropriate radio button   3. Add a New Report:   - Select Shared Data Source that you just created   - Paste the CAML Query into the Query String. You may have to find out the GUID for the SharePoint List and View on which you are re...

Emailing Exported File from SQL Server Reporting Services 2005

Image
I have created a sample class to email exported reports [PDF, Excel etc.] from SQL Reporting Services. To do that, I had to add a Report Viewer into the form and set Visible property to False. This web form actually grabs the parameter values from query string and process the report accordingly. You may call this form from another web page and pass the parameters like this:   =================================================== Email form calling function =================================================== private void emailReport() { try { string _period1 = Convert .ToString( Convert .ToDateTime(dtStartDate.Value.ToString()).ToString( "yyyyMM" )); string _period2 = Convert .ToString( Convert .ToDateTime(dtEndDate.Value.ToString()).ToString( "yyyyMM" )); string _division = Convert .ToString(ddDivisions.SelectedValue.ToString()); string _department = Convert .ToString(ddDepartment.SelectedValue.ToString()); string _employee = "" ; ...