How to Add a Date Filter to a BDC

for Tammie, apologies for the late reply. i hope you will still find this useful.

I’ve worked with BDCs quite a bit, especially when MOSS was still very new (B2, B2TR, Gold Code, and RC). This is the only way I’ve gotten Date Filters to work in BDCs.

1. In the <FilterDescriptors> section, add your date filter descriptor.

<FilterDescriptor Type="Comparison" Name="Date Entered">
  <Properties>
    <Property Name="Comparator" Type="System.String">Equals</Property>
  </Properties>
</FilterDescriptor>

2. In the <Parameters> section, add 2 parameters: a low date boundary, and a high date boundary

<Parameter Direction="In" Name="@min_date_entered">
  <TypeDescriptor TypeName="System.DateTime" AssociatedFilter="Date Entered" Name="min_date_entered">
    <DefaultValues>
      <DefaultValue MethodInstanceName="MyListFinder" Type="System.DateTime">2000-01-01 01:01:01Z</DefaultValue>
      <DefaultValue MethodInstanceName="MyListSpecificFinder" Type="System.DateTime">2000-01-01 01:01:01Z</DefaultValue>
    </DefaultValues>
  </TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="@max_date_entered">
  <TypeDescriptor TypeName="System.DateTime" AssociatedFilter="Date Entered" Name="max_date_entered">
    <DefaultValues>
      <DefaultValue MethodInstanceName="MyListFinder" Type="System.DateTime">3000-01-01 01:01:01Z</DefaultValue>
      <DefaultValue MethodInstanceName="MyListSpecificFinder" Type="System.DateTime">3000-01-01 01:01:01Z</DefaultValue>
    </DefaultValues>
  </TypeDescriptor>

3. For the list of return values, add your datetime column

<Parameter Direction="Return" Name="MyList">
  <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="MyListDataReader">
    <TypeDescriptors>
      <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="MyListDataRecord">
        <TypeDescriptors>

<TypeDescriptor TypeName=“System.String” IdentifierName=“my_id” Name=“my_id”>
<LocalizedDisplayNames>
<LocalizedDisplayName LCID=“1033”>CA ID</LocalizedDisplayName>
</LocalizedDisplayNames>
</TypeDescriptor>

<TypeDescriptor TypeName=“System.DateTime” Name=“date_entered”>
<LocalizedDisplayNames>
<LocalizedDisplayName LCID=“1033”>Date Entered</LocalizedDisplayName>
</LocalizedDisplayNames>
<Properties>
<Property Name=“DisplayByDefault” Type=“System.Boolean”>true</Property>
</Properties>
</TypeDescriptor>

</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>

DEVTEACH/VANTUG 2007 – Sharepoint Integration Presentation Materials

Yaroslav and I did a presentation at VANTUG on November 22, 2007 (Thanks to Graham Jones, President of VANTUG, for inviting us to speak!). As promised, here are the presentation materials. These are the same materials we are going to use for DEVTEACH on November 28, 2007.

As we mentioned in the presentation, we used a real business case as a basis for the demo. The solution in our project involved:
– Sharepoint as portal/framework (specifically MOSS)
– WCF for communication between Sharepoint and backend databases
– Custom Web Part for entry forms and client-side validation
– BDC for search and data display
– SSNS for notification and audit trails

Continue reading

DevTeach/VANTUG Presentation: Resources

List of useful resources. Most of these I’ve used or read at some point, and revisited in preparation for the VANTUG/DevTeach demo. I hope this becomes useful to someone.

Building Your Dev Environment
Tony Zink. Creating a MOSS VPC Image: The whole 9 yardshttp://www.pptspaces.com/sharepointreporterblog/Lists/Posts/Post.aspx?ID=28
Bill English. Installing a New Microsoft Office SharePoint Server 2007 Portal: Step-by-Step Instructionshttp://mindsharpblogs.com/bill/archive/2006/06/27/1153.aspx
Sahil Malik. A Single Developer’s SharePoint 2007 Development Environment http://blah.winsmarts.com/2007-10-A_Single_Developers_SharePoint_2007_Development_Environment.aspx

Custom Web Parts
Developer Introduction to Workflows for Windows SharePoint Services 3.0 and SharePoint Server 2007 http://msdn2.microsoft.com/en-US/library/aa830816.aspx
Sharepoint Web Parts Overview http://msdn2.microsoft.com/en-us/library/ms432401.aspx
Windows SharePoint Services Web Part Infrastructurehttp://msdn2.microsoft.com/en-us/library/ms415560.aspx
Walkthrough: Creating a Basic SharePoint Web Parthttp://msdn2.microsoft.com/en-us/library/ms452873.aspx
Walkthrough: Creating Connectable SharePoint Web Partshttp://msdn2.microsoft.com/en-us/library/ms469765.aspx
Creating Web Parts in Windows SharePoint Services http://msdn2.microsoft.com/en-us/library/ms367238.aspx
Working with the Windows SharePoint Services WebPart Class http://msdn2.microsoft.com/en-us/library/ms473203.aspx
Channel 9 Video: Building ASP.NET Web Parts for Windows SharePoint Services 3.0http://channel9.msdn.com/ShowPost.aspx?PostID=192071
15 Seconds: Building Web Parts for Windows SharePoint Services 3.0http://15seconds.com/issue/060824.htm
15 Seconds: Building an ASP.NET 2.0 Web Part for Deployment to WSS V3.0 and MOSS 2007http://15seconds.com/issue/060914.htm
Walkthrough: Creating an ASP.NET Web Part for the AdventureWorks Business Data Application Samplehttp://msdn2.microsoft.com/en-us/library/ms558854.aspx
SharePoint Products and Technologies: Creating Custom Web Part Page Templates Samplehttp://www.microsoft.com/downloads/details.aspx?familyid=48b2c899-db2c-4a93-aa95-af4a37fa8ae8&displaylang=en
Sahil Malik. Writing Custom Webparts for Sharepoint 2007http://blah.winsmarts.com/2006/05/14/writing-custom-webparts-for-sharepoint-2007.aspx

SQL CLR
CLR Integration in SQL Server 2005http://aspalliance.com/1081_CLR_Integration_in_SQL_Server_2005.2
Building my First SQL Server 2005 CLRhttp://www.simple-talk.com/sql/learn-sql-server/building-my-first-sql-server-2005-clr/
Using Signed Assemblies for SQLCLR: Doing the Safety Dancehttp://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx

BDC
MSDN: Business Data Cataloghttp://msdn2.microsoft.com/en-us/library/ms563661.aspx
Business Data Catalog Sampleshttp://msdn2.microsoft.com/en-us/library/aa598181.aspx
Sahil Malik. SharePoint 2007: BDC – The Business Data Cataloghttp://blah.winsmarts.com/2007-4-SharePoint_2007__BDC_-_The_Business_Data_Catalog.aspx
TechNet Virtual Lab: Getting Started with the Business Data Catalog in Microsoft Office SharePoint Server 2007 http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032331910&EventCategory=3&culture=en-US&CountryCode=US
OS303 – SharePoint Server 2007 Business Data Catalog: Integrating Line of Business Data and Applications into Enterprise Portals (OS303_Burke.wmv)http://www.microsoft.com/downloads/details.aspx?FamilyID=5ec4193a-8061-4fd8-8ca4-574540049fe9&DisplayLang=en
Microsoft SharePoint Products and Technologies Team Blog: Business Data Cataloghttp://blogs.msdn.com/sharepoint/archive/2006/04/18/578194.aspx
AdventureWorks SQL Server 2005 BDC Samplehttp://msdn2.microsoft.com/en-us/library/ms494876.aspx
Troubleshooting Business Data Clients and Metadatahttp://msdn2.microsoft.com/en-us/library/ms499588.aspx
Walkthrough: Using the Business Data Catalog Security Trimmer to Trim Search Resultshttp://msdn2.microsoft.com/en-us/library/bb447548.aspx

Notification Services
Building Effective SQL Server Notification Applicationshttp://www.simple-talk.com/sql/sql-server-2005/building-effective-sql-server-notification-applications-part-i/
SQL Server 2005 Notification Services Tutorial.http://msdn2.microsoft.com/en-us/library/ms170337.aspx
MSDN Webcast: Introducing Notification Services in SQL Server 2005—Level 200 http://msevents.microsoft.com/cui/webcasteventdetails.aspx?eventid=1032263436&eventcategory=5&culture=en-us&countrycode=us

Reporting Services
Raju Sakthivel. Microsoft SQL Server Reporting Services – Installation and Configuration Guide for SharePoint Integration Mode (very good resource)http://blogs.msdn.com/sharepoint/attachment/4194088.ashx
Microsoft SharePoint Products and Technologies Team Blog. Microsoft SQL Server 2005 SP2 Reporting Services integration with WSS 3.0 and MOSS 2007.http://blogs.msdn.com/sharepoint/archive/2007/02/19/microsoft-sql-server-2005-sp2-reporting-services-integration-with-wss-3-0-and-moss-2007.aspx
How to: Configure SharePoint Integration on Multiple Servershttp://technet.microsoft.com/en-us/library/bb677365.aspx
How to: Configure SharePoint Integration on a Standalone Serverhttp://technet.microsoft.com/en-us/library/bb677368.aspx
Reporting Services Configuration How-to Topicshttp://msdn2.microsoft.com/en-us/library/ms157412.aspx
Report Server How-to Topics (SharePoint Integrated Mode)http://msdn2.microsoft.com/en-us/library/bb283321.aspx
SQL Server 2005 Reporting Services Tutorials.http://msdn2.microsoft.com/en-us/library/ms170246.aspx
William Li. Service Account Configuration for Reporting Servicehttp://blogs.msdn.com/williaml/archive/2006/10/21/service-account-configuration-for-reporting-service.aspx

Tools and Utilities
Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensionshttp://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&displaylang=en
.NET Reflectorhttp://www.aisto.com/roeder/dotnet/
SQL Server 2005 Sample Databases (including AdventureWorksLT)http://www.codeplex.com/MSFTDBProdSamples
SQL Server 2005 SP2http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx
MOSS SDK – August 2007http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en
BDC Editor (included in MOSS SDK – August 2007 Release)http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en
BDC Metamanhttp://www.bdcmetaman.com/
Microsoft Virtual Serverhttp://www.microsoft.com/windowsserversystem/virtualserver/
Windows Powershell http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
SharePoint Products and Technologies: Creating Custom Web Part Page Templates Samplehttp://www.microsoft.com/downloads/details.aspx?familyid=48b2c899-db2c-4a93-aa95-af4a37fa8ae8&displaylang=en
Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologieshttp://www.microsoft.com/downloads/details.aspx?FamilyID=1E53F882-0C16-4847-B331-132274AE8C84&displaylang=en

Additional Resources
Application Templates for Windows SharePoint Services 3.0http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx
WSS How To’shttp://office.microsoft.com/en-us/sharepointtechnology/FX101494691033.aspx?ofcresset=1
MOSS How To’shttp://office.microsoft.com/en-us/sharepointserver/FX101211721033.aspx
Windows Powershell Script Repositoryhttp://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx?mfr=true

How to Show Your BDC Results in XML

Lifesaver BDC XSLT! This XSL snippet of code allows you to show your BDC results in XML. This is extremely useful especially when you are trying to style your BDC results using XSLT.

This is applicable to BDCs or Data View Web Parts :
1. Edit the Page
2. Click Edit on the BDC Web Part
3. Modify Sharepoint Web Part
4. Click on XSL Source Editor

5. Type the following: