There is no doubt that SAP Crystal Reports is a great tool for designing and developing reports that could cover almost all business needs. Unfortunately it also has some limitations that cause trouble to developers throughout the development process. In today’s post I explain one of these limitations that I recently encountered and how I managed to overcome it.
For one of our clients who leverages SAP Crystal Reports as a reporting engine, I was required to modify more than 20 existing reports by adding a new filter to reports and respectfully to the underlying stored procedures to reflect changed business needs. Initially the task seemed quite simple but it turned out that SAP Crystal Reports is very sensitive when it comes to changes in stored procedure parameters.
What I did was to alter one of the stored procedures by adding the required parameter. Then I refreshed the report in Visual Studio using the Verify Database command available from Crystal Reports->Database->Verify Database menu (also available from the Field Explorer panel). To my surprise, the result I got was the following error message:
Database Connector Error: ADO Error Code: 0x80040e10
Source: Microsoft SQL Server Native Client 10.0
Description: Procedure or function ‘Report_CollectionAnalysis’ expects parameter ‘@year’, which was not supplied.
In one of my latest projects I was faced with the need to hide the OOTB Title column in a custom SharePoint list. Initially I thought this would be an easy job to be done within 2-3 minutes but it turned out I was wrong. I read several articles on the web, including a couple of discussions in MSDN forums dedicated to the exact same topic, but honestly none of the suggestions worked for me. Finally, I managed to find a working solution that I am glad to share with you, hoping it could be of help should you need to accomplish the same task.
The completed solution will provision a SharePoint list with a custom content type that has three fields and the Title column is hidden. For the sake of brevity I will highlight only the key artifacts comprising the sample, omitting details like the creation of custom fields and the deployment of a custom list with a feature.
We continue our series of useful tips and common development scenarios for SharePoint Managed Metadata with an article that shows how to declaratively provision a taxonomy field and how to connect it with an existing term set. It’s a follow up of Programmatically Import Term Set into Managed Metadata Term Store where we explained in details how to import a term set into the Managed Metadata term store.
The current sample uses the Company Enterprise Industry Taxonomy term set that we created in the previous post, so today we will not spend time explaining how to create a term set.
Define Taxonomy Fields in CAML
The creation of a field definition of the taxonomy type in SharePoint is a bit different than that of other field types. The main difference is that we actually need two fields – one field is assigned type TaxonomyFieldType and the other is of type Note.
Managed Metadata is one the great new features introduced in SharePoint 2010. That’s why we decided to write a series of articles describing some common scenarios that could be useful in practice.
Our first article will demonstrate how to programmatically import a term set defined in a csv file.
Creating term sets and terms using the browser is very straightforward using the Term Store Management Tool in Central Administration. However, there are some cases when we are required to programmatically create a term set by importing a csv file with terms into the Managed Metadata term store in SharePoint 2010.
In the following walkthrough we show how to create a valid csv file with term sets. Then we take a look at some of the key steps of building a SharePoint farm solution that imports the csv file into the Managed Metadata term store using the standard SharePoint Server 2010 API.
Prepare the CSV Term Store File
Let’s start with showing how to create the csv file with the managed metadata we want to import.
The import process requires a file with the .csv extension formatted a specific way. For details on this format, see the following TechNet article. Even after reading through all the details on the format though, building the file from scratch could be quite tedious and time-consuming. The good news is that there is a much easier way to accomplish this task – by using the great macro enabled template created by Wictor Wilén in his article Create SharePoint 2010 Managed Metadata with Excel 2010.
Once we download the template, we click on the Create New Term Store Sheet ribbon button located in SharePoint 2010 group. This will open a new sheet in Excel where we can enter our term set information. After the information is in place, we click on the Create Term Store File ribbon button. This saves the sheet data as a .txt file and we manually change the file extension to .csv.